-
Couldn't load subscription status.
- Fork 10.3k
feat(gatsby): handle graphql-import-node bundling #36951
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
Conversation
| "got": "^11.8.5", | ||
| "graphql": "^16.6.0", | ||
| "graphql-compose": "^9.0.9", | ||
| "graphql-tag": "^2.12.6", |
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.
This is already being installed transitively (codegen deps eventually install it), so it's not adding new dependency and just makes sure package managers install it in a way that can be resolved from within gatsby package
| type: `asset/resource`, | ||
| }, | ||
| { | ||
| test: /\.(graphqls?|gqls?)$/, |
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.
this is to match const VALID_EXTENSIONS = ['graphql', 'graphqls', 'gql', 'gqls']; from graphql-import-node package, so it doesn't exactly match instructions for loader ( https://www.npmjs.com/package/graphql-tag#webpack-loading-and-preprocessing )
(cherry picked from commit d5c775a)
(cherry picked from commit d5c775a) Co-authored-by: Michal Piechowiak <[email protected]>
Description
This adds bundling support in case someone is using https://www.npmjs.com/package/graphql-import-node to load queries from
.graphqlfiles from within gatsby-node file.Without this, engine compilation fails as compilation doesn't know how to handle
.graphqlimportsRelated Issues
[ch-56774]