Closed cometkim closed 2 years ago
if anyone is having this problem using Gatsby 3, fix the version of GraphQL to 15.3.0
.
tested on Gatsby 3.6.2
This can happen again anytime if there is a conflicting version of graphql-tools inside, and there doesn't seem to be any other way other than Yarn's resolutions
when the problem arises.
(Unless https://github.com/ardatan/graphql-tools/issues/3599 come)
v3 uses dependencies as of Gatsby v4. (graphql@15)
Revisit the issue when using an older version or when a Gatsby v5 is released.
The first time to use this plugin, the user will encounter this problem.
This is because the Gatsby environment does not allow multiple versions of graphql to be loaded.
(Gatsby v2.24.* uses GraphQL v14.7.0, codegen/tools uses v15)
Fixing the GraphQL version to 14.7.0 via the yarn resolutions field can resolve this
However, the plugin should completely delegates schema handling to
gatsby/graphql
to get rid of this problem.