question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vscode-graphql, LSP, IDE initiative

See original GitHub issue

Getting 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 or vscode-languageserver)

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 on onRequestWorkspaceSymbol. use invalidateCache()
  • 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 supports env, so we still have to figure out how to replace use of env

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
acaocommented, Aug 26, 2020

@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#L198

previously, 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!

1reaction
acaocommented, Nov 26, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found