graphql-config
graphql-config copied to clipboard
Local schema as npm dependency
Hi guys, I have dependency in my project which contains the schema file. It seems I can't get the config right, or at least my IDE (webstorm) seems to be ignorant of the schema file. Some help would be appreciated. Thanks!
{
"schemaPath": "./node_modules/@foo/graphql-schema/schema/schema.graphqls",
"extensions": {
"endpoints": {
"local": {
"url": "http://localhost:8000/graphql"
}
}
}
}
We could add @graphql-tools/module-loader
to support loading schemas using module:someModule#identifier
syntax. The existing loaders should however already be able to pick up a file like this:
schema: './node_modules/@foo/graphql-schema/schema/schema.graphql'