Replies: 1 comment
-
Gatsby looks at:
While I personally would say that a UI library should be stateless and not contain data (read: GraphQL queries) -- if you want to get it working you'll need to fulfill any of the requirements above. Here's a guide about creating a local plugin: https://www.gatsbyjs.com/docs/creating-a-local-plugin/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Describe the issue that you're seeing.
I got a nx monorepo with gatsby apps that imports from a shared UI lib. When adding graphql query under shared UI lib folder, it throw an error:
I think this happens because the parseQueries in query-compiler files only parse files under src:
https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/query/query-compiler.js#L121
Steps to reproduce
Clear steps describing how to reproduce the issue. Please link to a reproduction, this makes your issue much easier to diagnose (seriously).
How to Make a Minimal Reproduction: https://www.gatsbyjs.com/contributing/how-to-make-a-reproducible-test-case/
npm install
, runnpm run start
, on http://localhost:4200/, it will show above errorExpected result
What should happen?
Actual result
The result of this StaticQuery could not be fetched.
errorWhat happened.
Environment
Run
gatsby info --clipboard
in your project directory and paste the output here.Beta Was this translation helpful? Give feedback.
All reactions