birkir / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
137 stars 75 forks source link

Prismic api issue #197

Closed khriztianmoreno closed 4 years ago

khriztianmoreno commented 4 years ago

Hello, when I type gatsby develop I get the following error:

success onPreBootstrap - 0.019s
success createSchemaCustomization - 0.054s

 ERROR #11321  PLUGIN

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

Response not successful: Received status code 500

  ServerError: Response not successful: Received status code 500

  - index.js:23 Object.exports.throwServerError
    [prismic-source]/[apollo-link-http-common]/lib/index.js:23:17

  - index.js:48
    [prismic-source]/[apollo-link-http-common]/lib/index.js:48:21

  - task_queues.js:97 processTicksAndRejections
    internal/process/task_queues.js:97:5

Anyone got any clue what I'm doing wrong? I looked at the examples but it won't work for me, my gatsby develop doesn't generate any JSON files and my gatsby graphiql doesn't give me anything that's related to my Prismic repository.

With some spaces of Prismic, it works but with one especially not, I have the same configuration in both spaces

ohlr commented 4 years ago

Are you using prismic v2 api? From the docs:

Please be sure your Prismic repository has the GraphQL API enabled. It is enabled by default on all new Prismic repositories. If you have an older repository or are unable to access https://[your_repo].prismic.io/graphql, please reach out to Prismic support to request the GraphQL API.

khriztianmoreno commented 4 years ago

This seems like a prismic problem with some content-type and the cache they handle

Schema does not pass validation. Violations:\n\nType name 'Meta' is used for several conflicting GraphQL ObjectTypes based on different classes. Conflict found in a field 'node' of 'MetaConnectionEdge' type. One possible fix is to use ObjectTypeName like this: deriveObjectTypeFoo, Bar to avoid that two ObjectTypes have the same name