Use extension without config file
See original GitHub issueIs there any way to use the extension without a config file?
I work in an environment with multiple micro-services that uses graphql. The projects all have a single schema.graphql
-file but there is no need for a config file for graphql.
If I just open a .graphql
file in vscode, syntax highlighting works, but the “goto definition” feature doesn’t. It seems like I need a config file for that to work.
Isn’t there any way to get the extension to work with .graphql
files when you just have one of those in the project and don’t need a config file?
I have never had a config-file in any of my project and I have no idea what the purpose of it is. Is it framework specific? I find nothing in the graphql specification about this config-file. Is this extension for a specific framework?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top GitHub Comments
all about this! it’s already on the roadmap even, essentially. i’ve added this to the initiative.
the language server, and thus this extension and many extensions across various IDEs that use this language server need to specify at least a schema for now. like @orta pointed out, that can be specified in a config file or in
package.json
on the roadmap we have plans to make the language server work without schema present. currently, the only feature you would get from a config-less graphql project is highlighting, is that all you want?
I’m adding labels for both
graphql-language-service-server
andvscode-graphql
, since this implies enhancements in both projects, as well as our third party IDE plugin users (nvim, emacs, sublime, etc), who usually usegraphql-language-service-cli
. it should come as part of the next major version release, because we plan on changing thegraphql-language-service-interface
method interfaces (getAutocompleteSuggestions
,getHover
, etc) to accept an easier-to-expand-on object argument interface rather than using ordered arguments, and makingschema
argument optional for these methods is part of the goal of this!Ah yes, the multi-workspace support still needs to be added, that would explain your issues. Highlighting, autocompletion and jump to definition should all be working, and if not it’s a config issue, or lack of multi-workspace support. Hopefully another maintainer can help you as I am not able to work at the moment