vscode-graphql, LSP, IDE initiative
See original GitHub issueGetting things in better shape for vscode-graphql
which I am now maintainer of!
graphql-language-service-interface
- finish upgrading to
graphq-config@3.0.x
- schema loading, file loading, etc - new options argument for
getAutocompleteSuggestions
- allow use of implicit fragment definitions for completion
- option to return all completion options on empty or even invalid input (ala
codemirror-graphql
, etc)
-
getOutline
for workspaces -
getDefinition
for workspaces - when autocompleting a field that expands:
- automatically append
{}
- move cursor inside new brackets (this part may require
monoco
/vscode-languageserver
) - automatically complete for descending required fields on enter? (might be for
monaco
orvscode-languageserver
)
- automatically append
graphql-language-service-server
- offset outline/definitions positions for embedded
graphql
- build caches for all files immediately on
initialization
and on each relevant workspace folder/file event, or at least cache all definitions ononRequestWorkspaceSymbol
. useinvalidateCache()
- handle
RequestWorkspaceDefinition
event similarly - supporting the last two might require more configuration on the extension side as well
vscode-graphql
is becoming our go-to reference implementation, and this work is towards 3.x.x releases:
external issues:
-
graphql-config
endpoints extension no longer supportsenv
, so we still have to figure out how to replace use ofenv
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:6 (3 by maintainers)
Top Results From Across the Web
GraphQL: Language Feature Support
Extension for Visual Studio Code - GraphQL LSP extension that adds autocompletion, validation, go to definition, hover, outline and more.
Read more >How & Why Playground & GraphiQL are joining forces
At the time, LSP was not yet a commonly accepted standard, and VSCode had yet to become the incredibly popular development tool it...
Read more >Apollo extension for VS Code - Apollo GraphQL Docs
The extension enables you to: Add syntax highlighting for GraphQL files and gql templates inside JavaScript files; Get instant feedback and intelligent ...
Read more >Apollo GraphQL Announces Tighter Integration for Language ...
A key new improvement that Apollo GraphQL is working on is tighter integration with its Graph Manager product and Language Server Protocol (LSP) ......
Read more >GraphiQL & GraphQL LSP Ecosystem - BadgeApp
GraphiQL is the GraphQL Language Tooling Reference Ecosystem, intended for building both browser & desktop IDE tools for writing schemas ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@felippepuhle awesome! very excited about coc-graphql. i just cut an alpha of the lsp server last night that should be quite an enhancement!
customValidationRules
can be defined in the graphql-config that’s picked up by the LSP server. here’s where we apply them https://github.com/graphql/graphiql/blob/7dfaef7c96486b2a8bc23df133e3484708224dab/packages/graphql-language-service-interface/src/GraphQLLanguageService.ts#L198previously, it would load from a specified file path, but in graphql-config@3 we support commonjs. so now you can require() a file that provides an array of custom rules, or you can define them implicitly in the graphql.config.js file, your choice!
the follow up! https://github.com/graphql/graphiql/issues/2062