Prismic preview not working (414 Request-URI Too Large – graphql queries too long)

Has anyone come across this issue with preview and Gatsby?

I’m using “gatsby-source-prismic-graphql” version “3.6.2” and I’m getting an issue in Preview on pages where the graphql query is “too” long which is stopping updates from showing in previews (throws a console error for a graphql query which says " 414 Request-URI Too Large").

I’ve found these 2 threads:

Neither of which provide a resolution, anyone encountered this issue and found a solution or workaround to the problem?

If I reduce the number of graphql queries on the page then it works, but that means I can’t render all the components on the page.


hello @robsimpson, this issue is because prismic does not allow post requests to their graphql endpoint but only get requests. When you have too much graphql sent over to prismic via query string, you may end up hitting the max url spec.

This causes you 414 (Request uri too large) error