Skip to content
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

[1.0] Scan for graphl queries in locations other than src. #1280

Closed
craigmulligan opened this issue Jun 28, 2017 · 4 comments
Closed

[1.0] Scan for graphl queries in locations other than src. #1280

craigmulligan opened this issue Jun 28, 2017 · 4 comments

Comments

@craigmulligan
Copy link

Carried over from discussion here: product-os/landr#25

@craigmulligan
Copy link
Author

The problem:

Right now the relay compiler scans for grapqhl queries and fragments for all js files in "src" as well as any page component, unfortunately if a plugin is exposing it's own components or the user is putting components in another directory they are never compiled and added to graphql.

@craigmulligan
Copy link
Author

I'd prefer to make the graphql compiler programatically accept paths via the bound actions api, in the same way you'd createPages() you could setgraphqlCompileComponent or something with a better name :)

@jbolda jbolda added DX labels Jun 28, 2017
@KyleAMathews
Copy link
Contributor

I'd prefer to make the graphql compiler programatically accept paths via the bound actions api, in the same way you'd createPages() you could setgraphqlCompileComponent or something with a better name :)

This would be great too I think — the problem is it doesn't solve the use case of someone wanting to install a Gatsby-specific component that has an included GraphQL fragment. Unless we treat these components as plugins basically and make people add them to their gatsby-config.js

@KyleAMathews
Copy link
Contributor

This PR added support for plugins including fragments #2320 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants