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

[v2] Support Graphql queries in npm package / node_modules #4322

Open
jbolda opened this Issue Mar 2, 2018 · 2 comments

Comments

2 participants
@jbolda
Contributor

jbolda commented Mar 2, 2018

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 createPage, but eventually supporting fragments would be nice as well.

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).

@jbolda jbolda added this to To Do in Gatsby v2 Release Mar 2, 2018

@KyleAMathews

This comment has been minimized.

Contributor

KyleAMathews commented Mar 2, 2018

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.

@KyleAMathews KyleAMathews moved this from To Do to non-blocking but would be great to have in Gatsby v2 Release Mar 6, 2018

@jbolda

This comment has been minimized.

Contributor

jbolda commented Aug 6, 2018

Point 5) in #3870 moved to #7064 it seems for anyone following along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment