Strongly typed GraphQL queries #13546
Labels
stale?
Issue that may be closed soon due to the original author not responding any more.
topic: GraphQL
Related to Gatsby's GraphQL layer
Summary
Currently, the only option available to check for invalid GraphQL queries is through eslint-plugin-graphql by using gatsby-plugin-extract-schema.
It would be nicer if static types could be generated with graphql-code-generator during builds (even in development), extending a pre-defined interface (inside
node_modules
) through a file inside the.cache
folder with declaration merging instead of usingany
in the type definitions of query-related methods.Motivation
Static typing is gaining traction amongst frontend developers. A previous issue (#2374) has a partial solution for typed GraphQL queries, but proper support has yet to be built into the core of Gatsby.
The text was updated successfully, but these errors were encountered: