I’ve started getting an GraphQL error when querying a Prismic embed field from Gatsby. It’s worked fine for the last few weeks but started erroring this morning (with no changes on my side).
After a bit of debugging it started working again for an hour or so but now I’m seeing the error again.
In Gatsby’s GraphQL editor it returns the error Cannot query field \"[field_name]\" on type \"PrismicEmbedType\
for each field nested inside the embed field.
This is the query working as expected previously:
This is the same query returning an error:
In the Prismic GraphQL editor it returns the error Field 'video' of type 'Json' must not have a sub selection
so this seems to be the root error that’s causing the one in Gatsby.
This is the query that used to work, now returning an error:
It no longer lets me define the fields I want to be returned and just returns everything as below:
Apart from this being inconsistent behaviour, in the Gatsby GraphQL editor it forces me to add a nested field so it’s not possible to just query the field with no subsections.
As nothing has changed on my side it looks like it must be something to do with Prismic’s definition of the embed field changing that has caused the error.
The Prismic repo for this project is mattrawworksinclay. Thanks for your help