-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby-transformer-sharp): define required image fields as non-null in schema #20314
fix(gatsby-transformer-sharp): define required image fields as non-null in schema #20314
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion! It makes perfect sense. Left one request for a change (minor change for consistency). Then we are good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me, thanks for the PR!
Holy buckets, @daugsbi — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Description
The generated graphql schema have a lot of nullable fields which are required for images (i.e. the src of an image). This makes it incompatible to use it with type generators and TypeScript.
This PR changes the gatsby-source-contentful and the gatsby-transformer-sharp to be at least compatible with the gatsby-image type definitions.
Documentation
Docs should exist already. I don't expect that they include such details.
Related Issues
This PR should close #17003.