Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[v2] Support Graphql queries in npm package / node_modules #4322
As another layer of abstraction, it would be great to support templates and/or graphql fragments in npm packages as originally noted here in #2662 . This would require extracting graphql queries from node_modules. The low hanging fruit is to support extracting queries from any "components" specified in
Tangentially related is that gatsby would need to babel templates as well to deal with the graphql queries nicely. This is already planned in #3870 5).
I think this is a great idea! We'd need to evaluate how to do this in a performant way but it seems doable. I'm not going to make this a blocker for v2's release (it can go in at any time since it's not a breaking change) but would love someone to investigate the implications of doing this & make a PR if they'd like.