Those are queried using GraphQL and Gatsby (gatsby-source-prismic).
The funny thing is, that those identical elements and queries lead to different results. The response has the title's text in once case (External Article, TestType) nested in an array and in another not (Blog Post):
I double checked the schemas and looked for any differences in the types.
This could of course also be an issue of the source plugin and I have checked the repo for similar issues without any results.
Thanks for posting this question, and welcome to the Prismic community.
This is definitely strange behavior. I'm curious if this could be an issue with your local custom type JSON files. Is there a chance you changed your custom types in Prismic without updating the JSON locally? You could start by copy-pasting the JSON from your custom types in Prismic to the files in ~/src/schemas/.
Let me know if that helps at all! If not, I'll try to look into other potential causes.
This behavior seems to be coming from the plugin, which isn't developer or maintained by Prismic, so I'm not 100% sure on the expected behavior. However, I tried recreating this issue with a few custom types, and I never got the title nested in an array — so I think the expected behavior is an object.
So, it sounds like double-checking the schemas didn't solve the issue? Let me know if that's the case, and I'll keep investigating.
If it's the case that the default should be an object, it is curious, as I got an array again, when I created a new type for testing. I assumed that this would have to be the default, but couldn't see why an array would make sense in this case. This type contains nothing but a title.
Double-checking did indeed not resolve the issue.
I will create more test types this afternoon and see, whether arrays remain to be the default behavior in my case.
I will also create an issue in the plugin repo and point to this thread.
Should we move the discussion there?
`ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.base64.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.base64.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.base64.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.src.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.src.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.src.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.srcSet.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.srcSet.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.srcSet.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.srcWebp.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.srcWebp.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.srcWebp.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.srcSetWebp.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.srcSetWebp.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.srcSetWebp.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.sizes.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.sizes.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.sizes.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.width.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.width.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.width.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFixedType.height.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFixedType.height.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFixedType.height.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFluidType.base64.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFluidType.base64.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFluidType.base64.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFluidType.src.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFluidType.src.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFluidType.src.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFluidType.srcSet.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFluidType.srcSet.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFluidType.srcSet.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFluidType.srcWebp.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFluidType.srcWebp.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFluidType.srcWebp.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFluidType.srcSetWebp.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFluidType.srcSetWebp.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFluidType.srcSetWebp.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFluidType.sizes.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFluidType.sizes.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFluidType.sizes.
ERROR
Field extension arguments must be provided as an object. Received "SEARCHABLE" on PrismicImageFluidType.aspectRatio.
ERROR
Field extension arguments must be provided as an object. Received "SORTABLE" on PrismicImageFluidType.aspectRatio.
ERROR
Field extension arguments must be provided as an object. Received "true" on PrismicImageFluidType.aspectRatio.`