You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this plugin with Gatsby 5, you instantly get an error stating visitFn.call is not a function. The stack trace seems to suggest this is a pretty low level issue with gatsby-graphql-source-toolkit. My guess is it's fixed by gatsbyjs/gatsby-graphql-toolkit#48, but that's not yet merged by Gatsby.
Stack trace
ERROR #11321 PLUGIN
"gatsby-source-craft" threw an error while running the createSchemaCustomization lifecycle:
visitFn.call is not a function
570 | const schema = await getSchema();
571 | const gatsbyNodeTypes = await getGatsbyNodeTypes(gatsbyApi.reporter);
> 572 | const documents = await compileNodeQueries({
| ^
573 | schema,
574 | gatsbyNodeTypes,
575 | customFragments: await collectFragments(),
File: node_modules/gatsby-source-craft/gatsby-node.js:572:29
TypeError: visitFn.call is not a function
- compile-node-queries.ts:149 compileDocument
[my-gatsby-site]/[gatsby-graphql-source-toolkit]/src/compile-node-queries/compile-node-queries.ts:149:10
- compile-node-queries.ts:73
[my-gatsby-site]/[gatsby-graphql-source-toolkit]/src/compile-node-queries/compile-node-queries.ts:73:17
- Array.forEach
- compile-node-queries.ts:72 compileNodeQueries
[my-gatsby-site]/[gatsby-graphql-source-toolkit]/src/compile-node-queries/compile-node-queries.ts:72:24
- gatsby-node.js:572 getSourcingConfig
[my-gatsby-site]/[gatsby-source-craft]/gatsby-node.js:572:29
- gatsby-node.js:368 Object.exports.createSchemaCustomization
[my-gatsby-site]/[gatsby-source-craft]/gatsby-node.js:368:20
- api-runner-node.js:487 runAPI
[my-gatsby-site]/[gatsby]/src/utils/api-runner-node.js:487:16
Well, that was quick. Gatsby-graphql-toolkit v2.0.3 fixes this issue. So now all that's needed to use this with Gatsby 5 is the --legacy-peer-deps flag until official support is added to this repo (I'll make a pull request for that soon).
Description
When using this plugin with Gatsby 5, you instantly get an error stating
visitFn.call
is not a function. The stack trace seems to suggest this is a pretty low level issue with gatsby-graphql-source-toolkit. My guess is it's fixed by gatsbyjs/gatsby-graphql-toolkit#48, but that's not yet merged by Gatsby.Stack trace
Steps to reproduce
npm run develop
Example repo
https://github.com/ThijmenDeValk/gatsby-source-craft-error-proof
Additional info
The text was updated successfully, but these errors were encountered: