gatsby-source-sanity icon indicating copy to clipboard operation
gatsby-source-sanity copied to clipboard

hotspot and crop returned as null but do exist

Open timbakkum opened this issue 3 years ago • 3 comments

the hotspot and crop values are returned as null when querying them through the gatsby gql server when using this plugin, but when using the original graphql api of my sanity studio, the values are returned.

Any pointers on how this is possible and/or how to troubleshoot this?

timbakkum avatar Sep 22 '21 09:09 timbakkum

I switched the generation of the gql schema to gen2 and now I'm receiving the data, even when I switch it back to gen1 it keeps returning the data for hotspot and crop so I don't know what went wrong 🤷🏻

timbakkum avatar Sep 22 '21 09:09 timbakkum

Just want to add to this, as I believe we are experiencing the same problem.

Some data returns null for us unless we first run gatsby clean to clear cache before building or developing. Seems to mostly affect reference types (e.g. referencing an author object in a post schema). author.name returns null, but if we clear Gatsby cache, this returns the data we want in Graphql.

Obviously a bug in the Sanity source plugin. Happy to provide more details to get this fixed if needed.

i-bsd avatar Jan 02 '22 05:01 i-bsd

Just want to add to this, as I believe we are experiencing the same problem.

Some data returns null for us unless we first run gatsby clean to clear cache before building or developing. Seems to mostly affect reference types (e.g. referencing an author object in a post schema). author.name returns null, but if we clear Gatsby cache, this returns the data we want in Graphql.

Obviously a bug in the Sanity source plugin. Happy to provide more details to get this fixed if needed.

I tried to clean the cache and doesn't work T.T

PhantomLord666 avatar Jul 23 '23 17:07 PhantomLord666