Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building gatsby after updating to 7.7.0 #245

Closed
frodestorhaug opened this issue Jul 11, 2023 · 14 comments · Fixed by #248
Closed

Error building gatsby after updating to 7.7.0 #245

frodestorhaug opened this issue Jul 11, 2023 · 14 comments · Fixed by #248

Comments

@frodestorhaug
Copy link

ERROR #85901 GRAPHQL.UNKNOWN

There was an error in your GraphQL query:

Cannot read properties of undefined (reading 'type')

works on 7.6.3 - Is this a change or a bug ?

@djavco
Copy link

djavco commented Jul 11, 2023

I'm also seeing error having updated to 7.7.0 with empty null fields in an array of reference objects - I've had to downgrade to earlier version. You can see the field names but they are all null. References which are not in an array work and the fields are not null.

@fvieira
Copy link

fvieira commented Jul 13, 2023

We are seeing a similar bug too, also had to downgrade.

@dmorda
Copy link

dmorda commented Jul 18, 2023

Same here, moving back to 7.6.3 fixed it for me.

@chrispecoraro
Copy link
Contributor

There are not enough tests to cover such drastic changes and obviously, the question is always "Which side should maintain this plugin, now: Gatsby/Netlify or Sanity?"

@chrispecoraro
Copy link
Contributor

@ascorbic A colleague mentioned that it looks like .type is being used instead of ._type.

@ascorbic
Copy link
Contributor

Thanks for the tag. I'm going to look into this today.

@ascorbic
Copy link
Contributor

Can those of you who are having these issue share the specific queries that are causing the problem, and if possible the relevant parts of the schema? I've not been able to reproduce this myself, but this may just be that my schema does't include the particular types that cause this. You'll find the schema in .cache/schema.gql after you do a build

@fvieira
Copy link

fvieira commented Jul 20, 2023

Hi @ascorbic, I don't have the time to put together what you need at the moment, but I'll link you to this thread on Sanity's slack where this was discussed, maybe the info there is enough for you: https://sanity-io-land.slack.com/archives/CEMV34XAB/p1689786840037059

@ascorbic
Copy link
Contributor

Thanks

@dmorda
Copy link

dmorda commented Jul 20, 2023

Let me know if the attached helps.
schema.txt
bulid log.txt

@JustFly1984
Copy link

reverting it to 7.6.3 fixed it for me too.

@ascorbic
Copy link
Contributor

ascorbic commented Jul 21, 2023

If anyone else is able to share the error (with query), .cache/schema.gql and the gatsby version it would be a great help. Thanks

@ascorbic
Copy link
Contributor

@dmorda is the schema you shared from the same plugin version as the one that was erroring? Also, can you let me know which version of gatsby that you're using?

@dmorda
Copy link

dmorda commented Jul 21, 2023

Sorry, I forgot to include those details. The files I attached were from the build that is failing. Specifically, I upgraded gatsby-source-sanity from 7.6.3 (working) to 7.8.0 (not working). When I ran the build that is failing, I was using [email protected]. I'm on macOS Apple Silicon using Node 18.17.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants