prismicio / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
17 stars 14 forks source link

sourceNodes lifecycle error #33

Closed schwigri closed 4 years ago

schwigri commented 4 years ago

Hi, I'm not 100% familiar with this plugin but I've switched since the original gatsby-source-prismic-graphql no longer seems to work. I've just tried to use this plugin for the first time and if I run npm run develop, I get this error and there is no Prismic content in GraphQL. Any help would be appreciated.

 ERROR #11321  PLUGIN

"@prismicio/gatsby-source-prismic-graphql" threw an error while running the sourceNodes lifecycle:

Schema must contain uniquely named types but contains multiple types named "DateTime".

  109 |   };
  110 | 
> 111 |   const schema = wrapSchema({
      |                  ^
  112 |     schema: introspectionSchema,
  113 |     executor: linkToExecutor(link)
  114 |   }, [new StripNonQueryTransform(), new RenameTypes(name => `${typeName}_${name}`), new NamespaceUnderFieldTransform({

File: node_modules/gatsby-source-graphql/gatsby-node.js:111:18

  Error: Schema must contain uniquely named types but contains multiple types named "DateTime".

  - Array.reduce

  - mapSchema.js:31 mapSchema
    [schwigri]/[@graphql-tools]/wrap/dist/utils/src/mapSchema.js:31:12

  - clone.js:41 cloneSchema
    [schwigri]/[@graphql-tools]/wrap/dist/utils/src/clone.js:41:12

  - transforms.js:3 
    [schwigri]/[@graphql-tools]/wrap/dist/utils/src/transforms.js:3:115

  - Array.reduce

  - transforms.js:3 Object.applySchemaTransforms
    [schwigri]/[@graphql-tools]/wrap/dist/utils/src/transforms.js:3:23

  - generateProxyingResolvers.js:22 generateProxyingResolvers
    /Users/griffen/Developer/schwigri/dist/wrap/src/generateProxyingResolvers.js:22:31

  - wrapSchema.js:20 wrapSchema
    /Users/griffen/Developer/schwigri/dist/wrap/src/wrapSchema.js:20:31

  - gatsby-node.js:111 exports.sourceNodes
    [schwigri]/[gatsby-source-graphql]/gatsby-node.js:111:18

  - From previous event:

  - api-runner-node.js:440 Promise.catch.decorateEvent.pluginName
    [schwigri]/[gatsby]/src/utils/api-runner-node.js:440:9

  - From previous event:

  - api-runner-node.js:439 
    [schwigri]/[gatsby]/src/utils/api-runner-node.js:439:14

  - timers.js:439 processImmediate
    internal/timers.js:439:21

  - From previous event:

  - api-runner-node.js:431 
    [schwigri]/[gatsby]/src/utils/api-runner-node.js:431:13

  - From previous event:

  - api-runner-node.js:347 module.exports
    [schwigri]/[gatsby]/src/utils/api-runner-node.js:347:3

  - source-nodes.ts:94 _default
    [schwigri]/[gatsby]/src/utils/source-nodes.ts:94:9

  - source-nodes.ts:24 sourceNodes
    [schwigri]/[gatsby]/src/services/source-nodes.ts:24:9

  - interpreter.js:721 Interpreter.exec
    [schwigri]/[xstate]/lib/interpreter.js:721:27

  - interpreter.js:223 Interpreter.execute
    [schwigri]/[xstate]/lib/interpreter.js:223:22

  - interpreter.js:243 Interpreter.update
    [schwigri]/[xstate]/lib/interpreter.js:243:18

  - interpreter.js:144 
    [schwigri]/[xstate]/lib/interpreter.js:144:23

  - scheduler.js:59 Scheduler.process
    [schwigri]/[xstate]/lib/scheduler.js:59:13

  - scheduler.js:43 Scheduler.schedule
    [schwigri]/[xstate]/lib/scheduler.js:43:14

  - interpreter.js:140 Interpreter.send
    [schwigri]/[xstate]/lib/interpreter.js:140:29

  - interpreter.js:836 actor.id
    [schwigri]/[xstate]/lib/interpreter.js:836:23