GraphQL query on certain documents

Hello, starting November 20 two out of three documents of a certain type stopped returning their slice content. I created a new document of that type on the same day and it returns slice content.

Did my documents get corrupted or something? I use the gatsby-source-prismic-graphql plugin to source the data. See an example of the error output below.

 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Expected Iterable, but did not find one for field Blog.body.

   6 |           _meta {
   7 |             firstPublicationDate
   8 |             lastPublicationDate
   9 |             tags
  10 |             type
  11 |             uid
  12 |           }
  13 |           post_author
  14 |           post_date
  15 |           post_title
> 16 |           body {
     |           ^
  17 |             ... on PRISMIC_BlogBodyText_block {
  18 |               type
  19 |               label
  20 |               primary {
  21 |                 content_collapse
  22 |                 disclaimer_text
  23 |                 text_block_header
  24 |                 tooltip
  25 |               }
  26 |               fields {

File path: /Users/andrey.drozd/Development/repo-name/src/templates/Blog.js
Url path: /news/welcome-to-the-smalls
Plugin: none

Hey Andrey, at first glance I wouldn't be able to know what the problem may be. Have you ran gatsby clean before running your project so that the schema gets updated?

It's important to note that we're not giving support to that plugin anymore. Here's the article were we point out all the details about this.

We have a fork of the plugin that I'd recommend you to install instead of the original plugin, this is: https://github.com/prismicio/gatsby-source-prismic-graphql

I run gatsby clean as part of an npm script that sets up the local development environment.

I understand that the plugin isn't supported anymore, but that doesn't mean it should stop working all of a sudden without any notice. That's unacceptable.

What's the difference between the Prismic fork of the plugin and this one (https://github.com/angeloashmore/gatsby-source-prismic)? Which one is future-proof? I don't want to be updating to another plugin a few months down the line when this fork potentially stops working.

I installed the Prismic fork of gatsby-source-prismic-graphql and I still receive the same type of error, except the error message is swallowed up, even when running with the gatsby develop --verbose. See below.

verbose 6.63 Transition to "runningQueries" > "runningStaticQueries"
success run static queries - 0.380s - 9/9 23.70/s
verbose 7.023 Transition to "runningQueries" > "runningPageQueries"
error There was an error in your GraphQL query:

Internal server error

File path: /Users/andrey.drozd/Development/main-site/src/templates/Blog.js
Url path: /news/welcome-to-the-smalls
Plugin: none
error There was an error in your GraphQL query:

Internal server error

File path: /Users/andrey.drozd/Development/repo-name/src/templates/Blog.js
Url path: /news/first-post
Plugin: none
success run page queries - 0.816s - 26/26 31.86/s

I ended up duplicating the files that were causing issues and archiving the originals. The problem went away and now everything works... Something must've been wrong with the Matrix.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.