-
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): Throw Typegen errors & add IGatsbyImageData
to output
#35683
Conversation
IGatsbyImageData
to output
Oh good, I was just coincidentally checking how you worked around the generic Related feature request: #33317 |
Also, if this helps, in our environment the |
Works in my testing. It adds import type { IGatsbyImageData } from 'gatsby-plugin-image'; At the top of the file and then reuses that in the scalars type Scalars = {
GatsbyImageData: IGatsbyImageData;
JSON: Record<string, unknown>;
}; |
Oh, you were right. The global namespace doesn't work if you add an import, so I switched it to the dynamic import. Luckily this was also caught by the e2e tests 👍 |
@aaronadamsCA which other generic JSON scalars did you run into? I can change others, too |
@LekoArts That was the only one we had encountered so far. Looking forward to seeing this ship! |
Looks good, do you want to do the same for imageCDN located in gatsby-plugin-utils? |
Description
panic
during developIGatsbyImageData
type for gatsbyImageDataDocumentation
I'll add a
docsUrl
to the error in #35584Related Issues
[ch50768]
[ch50542]
#35420 (comment)