This is an issue is to discuss our plan to convert this library to TypeScript.
Note: We will still continue to provide full Flow typings in the same package.
This effort is in line with the ongoing conversion of GraphQL IDE packages (GraphiQL, GraphQL LSP, etc.): https://github.com/graphql/graphiql/tree/convert-to-ts
Note this decision is not related to the technical aspect of Flow vs TS.
GraphQL.js has complete Flow coverage and it is excellent for ongoing maintenance. But our goal is to increase the number of active contributors and by switching codebase to TypeScript we hope to make the codebase feel more familiar and easy to contribute to.
Big thanks to @JacksonKearl from Apollo team for making PoC for such conversion and exploring different conversion strategies.
Before we start discussing the action plan here is a few important points:
14.x.x is stable release so we shouldn't do any potentially breaking things in this release.
- We need to do
15.0.0 anyway since it becomes hard to maintain support for Node6 since ESLint and other projects stop supporting it. Plus it allows us simply remove all deprecated stuff that was scheduled for removal in this release.
- Even after we release
15.0.0 we will still need to support 14.x.x as a branch and backport all critical or security-related bugfixes until 16.0.0.
Giving these constraints here is a plan I want to propose:
Also, I think it makes sense use this opportunity and fully convert our codebase to ES6 and idiomatic TypeScript. It means we can finally get rid of pre-ES6 classes constructs and also some weird constructs caused by Flow technical limitations
and other similar artifacts.
CC: @kassens @Neitsch @jbaxleyiii @JacksonKearl @martijnwalraven @mjmahone @acao @19majkel94 @tgriesser @nodkz @benjie
This is an issue is to discuss our plan to convert this library to TypeScript.
Note: We will still continue to provide full Flow typings in the same package.
This effort is in line with the ongoing conversion of GraphQL IDE packages (GraphiQL, GraphQL LSP, etc.): https://github.com/graphql/graphiql/tree/convert-to-ts
Note this decision is not related to the technical aspect of Flow vs TS.
GraphQL.js has complete Flow coverage and it is excellent for ongoing maintenance. But our goal is to increase the number of active contributors and by switching codebase to TypeScript we hope to make the codebase feel more familiar and easy to contribute to.
Big thanks to @JacksonKearl from Apollo team for making PoC for such conversion and exploring different conversion strategies.
Before we start discussing the action plan here is a few important points:
14.x.xis stable release so we shouldn't do any potentially breaking things in this release.15.0.0anyway since it becomes hard to maintain support for Node6 since ESLint and other projects stop supporting it. Plus it allows us simply remove all deprecated stuff that was scheduled for removal in this release.15.0.0we will still need to support14.x.xas a branch and backport all critical or security-related bugfixes until16.0.0.Giving these constraints here is a plan I want to propose:
*.d.tsfrom@types/graphqlinto tstypes folder and working on removing it from DefinetlyTyped. I included this typings in14.5.0release as the baseline for our future work.*.d.tsfiles with Flow types (some stuff is missing and a lot of types are based on14.0.0release) and identify all changes that were done in@types/graphqlbut weren't reflected in Flow. We will release these changes as14.5.1release.*.d.tsfiles are complete and don't break existing TS libraries we can branch of14.x.xand switch master to15.0.0-alpha.1. Remove all stuff marked as deprecated and was scheduled for removal in v15.15.0.0-alpha.xreleases just to get the early feedback.15.0.0-beta.xand ask the different project to test both our TS and Flow typings. After we fix all the issues we would release15.0.0and finish this conversion effort.Also, I think it makes sense use this opportunity and fully convert our codebase to ES6 and idiomatic TypeScript. It means we can finally get rid of pre-ES6 classes constructs and also some weird constructs caused by Flow technical limitations
and other similar artifacts.
CC: @kassens @Neitsch @jbaxleyiii @JacksonKearl @martijnwalraven @mjmahone @acao @19majkel94 @tgriesser @nodkz @benjie