Run rules over remote introspection schema #1030
-
Hi, have set up graphql-eslint locally, and can successfully run against a local .graphql file :
We have configured a remote schema using the parserOptions :
It appears that the remote schema is used as a 'base' that the local file is expected to extend, and may reference types from etc. However what we need is a way to run the rules against the remote schema itself. Is there a way to do this without first downloading the introspection output to a local json file? Thanks, Alan. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Alan, good question, it's not documented but it's possible, just tested it. "parserOptions": {
- "schema": "https://my.graphql-service.com/graphql",
+ "schema": ["https://my.graphql-service.com/graphql", "path-to-your-local-files/*.graphql"],
"schemaOptions": {
"headers": {
"Authorization": "Bearer ..."
} Would you contribute and submit a PR with documentation change? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I reread your question if you want to run |
Beta Was this translation helpful? Give feedback.
Sorry, I reread your question if you want to run
graphql-eslint
rules against your remote schema - there is no way without downloading your schema asgraphql
file. But if you want to extend your remote schema with your local schema you can do it in the way described above.