Graphiql: GraphQL language server - VSCode integration

Created on 31 Jan 2017  路  10Comments  路  Source: graphql/graphiql

@kumarharsh - I'm going to work on #6, and with that I'd love to talk about integrating this language server with your existing graphql-for-vscode library!

I think you've already put in a lot of effort into supporting GraphQL in VSCode, and I'd love to contribute to your repo and/or collaborate together by hooking up this language server if you're okay with it. I've already started some work by exporting the Atom syntax highlighter into .plist file.

Let me know what you think please!

enhancement

Most helpful comment

I didn't see any other way to use the language server in vscode, so I ended up writing a small lsp client extension to use this library with vscode - the autocomplete, diagnostics, and go to def work great. https://github.com/stephen/vscode-graphql

I'd be interested in adding more features like hover information and outlines as well.

All 10 comments

@asiandrummer I'm really liking the speed with which this project is developing. You guys are doing great job 馃憤

As you know, the graphql for vscode extension uses the gql lib for autocomplete, linting, references, etc, and ideally I'd prefer to keep using that library, until both libraries mature (this one and the @playlyfe/gql one). I think that's the best way to improve faster and ensure that the end users are better serviced.

To that end, i think the best and fastest way ahead would be If we can fork the extension and integrate this lib, (it shouldn't be too much work given the great architecture of vscode system). We can figure out other details as they come up. Let me know what you think.

@kumarharsh that sounds great - in fact I've already started doing some of what you've suggested (hackathon project!), so it's good to see we're on the same path. Let me update you as I make progress.

Just an update for tasks-to-do after hacking with @bolinfest - integrating vscode-languageserver library here makes sense as the library takes care of a language server communication protocol and error handling a lot better.

Any update or progress on this? @playlyfe/gql is a bit limiting in that it requires the raw schema's to function and not the introspection results. Which isn't optimal if your server code isn't colocated with your client.

I didn't see any other way to use the language server in vscode, so I ended up writing a small lsp client extension to use this library with vscode - the autocomplete, diagnostics, and go to def work great. https://github.com/stephen/vscode-graphql

I'd be interested in adding more features like hover information and outlines as well.

@stephen there's also the comparable but slightly more configurable https://github.com/mtsmfm/vscode-graphql-lsc

I recently made changes to https://github.com/prisma/vscode-graphql which add total support for lsp in both js and graphql files.

We've also spun off the language server part from @playlyfe/gql to https://github.com/Mayank1791989/gql-language-server

we are about to come out with our own official vscode graphql extension that provides a spec compliant implementation for other extensions to implement.

revision to earlier announcement: we will have an example vscode plugin, that implements the LSP and shows off the features, no more than a few hundred lines for both server/client at most.

also i've updated our entry on https://langserver.org. we are doing pretty great. going to open a new ticket for bumping the vscode-languageserver version, and some more GH projects to finish off some other LSP features.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asiandrummer picture asiandrummer  路  12Comments

sulliwane picture sulliwane  路  29Comments

naishe picture naishe  路  10Comments

wmertens picture wmertens  路  31Comments

ElijahLynn picture ElijahLynn  路  10Comments