You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works great, and I'm able to generate what I need..
I'm also using the VSCode GraphQL Extension, which in turn uses the graphql-language-service-server, which in turn uses graphql-config to load my .graphqlrc.yaml file.
However, it doesn't look like it's able to load the schema as I've defined it in my config. Instead I see the following message in the output for the GraphQL Language Server..
graphql-language-service-usage-logs: WARNING: graphql-config error, only highlighting is enabled:
fetch failed
for more information on using 'graphql-config' with 'graphql-language-service-server',
see the documentation at https://www.npmjs.com/package/graphql-language-service-server#user-content-graphql-configuration-file
Describe the solution you'd like
Looking at how graphql-config loads the schema, it doesn't appear to have @graphql-tools/github-loader defined as a loader?
I briefly looked into using something like https://www.graphql-inspector.com to download the schema, and make it available locally, but I'm already using the Schema AST plugin for graphql-codegen, which I think is more suited for that task..
If I do have the schema available locally, how would configure the .graphqlrc.yaml file to download the schema from GitHub, but also point graphql-language-service-server to the local GraphQL schema?
The text was updated successfully, but these errors were encountered:
If I do have the schema available locally, how would configure the .graphqlrc.yaml file to download the schema from GitHub, but also point graphql-language-service-server to the local GraphQL schema?
You can have one codegen configuration file that generates schema file then you can have a graphql config file for language server.
Is your feature request related to a problem? Please describe.
I use the
graphql-codegen
cli to generate TypeScript types, etc, for my GraphQL schema.graphql-codegen
is able to load the schema from GitHub using@graphql-tools/github-loader
.https://github.com/dotansimha/graphql-code-generator/blob/92fdaf4c518cc321fe51d98b82181592f61db485/packages/graphql-codegen-cli/src/graphql-config.ts#L18
I've defined the schema in my
.graphqlrc.yaml
file to load the schema from GitHub using the following configThis works great, and I'm able to generate what I need..
I'm also using the VSCode GraphQL Extension, which in turn uses the
graphql-language-service-server
, which in turn usesgraphql-config
to load my.graphqlrc.yaml
file.However, it doesn't look like it's able to load the schema as I've defined it in my config. Instead I see the following message in the output for the GraphQL Language Server..
Describe the solution you'd like
Looking at how
graphql-config
loads the schema, it doesn't appear to have@graphql-tools/github-loader
defined as a loader?graphql-config/src/extension.ts
Lines 30 to 42 in 6c935db
Is it possible to add the github loader?
Describe alternatives you've considered
I briefly looked into using something like https://www.graphql-inspector.com to download the schema, and make it available locally, but I'm already using the Schema AST plugin for
graphql-codegen
, which I think is more suited for that task..If I do have the schema available locally, how would configure the
.graphqlrc.yaml
file to download the schema from GitHub, but also pointgraphql-language-service-server
to the local GraphQL schema?The text was updated successfully, but these errors were encountered: