birkir / gatsby-source-prismic-graphql

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

ERROR #85901 GRAPHQL 'Max query depth 9 is reached' #181

Open bikalay opened 4 years ago

bikalay commented 4 years ago
 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Max query depth 9 is reached.

  161 |                     parent {
  162 |                       __typename
  163 |                       ... on PRISMIC_Content_page {
  164 |                         _meta {
  165 |                           uid
  166 |                         }
  167 |                         parent {
  168 |                           __typename
  169 |                           ... on PRISMIC_Content_page {
  170 |                             _meta {
> 171 |                               uid
      |                               ^
  172 |                             }
  173 |                           }
  174 |                         }
  175 |                       }
  176 |                     }
  177 |                   }
  178 |                   ... on PRISMIC_Home_page {
  179 |                     _linkType
  180 |                     _meta {
  181 |                       uid

How to increase the limit

I can run app with error in development mode. But i can't build

I already created issue for gatsgy but it was closed with coment:

ascorbic commented 2 hours ago Hi. This seems to be an issue with gatsby-source-prismic-graphql. That plugin does quite a bit of custom handling of graphql queries, so you'd need to check with them. Thanks.

Dependencies:

"gatsby": "^2.19.45", "gatsby-background-image": "^0.10.2", "gatsby-image": "^2.2.44", "gatsby-plugin-manifest": "^2.2.48", "gatsby-plugin-offline": "^3.0.41", "gatsby-plugin-react-helmet": "^3.1.24", "gatsby-plugin-sass": "^2.1.31", "gatsby-plugin-sharp": "^2.4.13", "gatsby-source-filesystem": "^2.1.56", "gatsby-source-prismic-graphql": "^3.5.0", "gatsby-transformer-sharp": "^2.3.19",

JonasJuss commented 4 years ago

I'm experiencing this same problem after migrating from gatsby-source-prismic to gatsby-source-prismic-graphql.

Is there any way to increase the max depth?

Prismic states the following on their page for retrieving linked documents: image

https://prismic.io/docs/graphql/query-the-api/fetch-linked-document-fields