Js-graphql-intellij-plugin: Support multiple versions of the GraphQL spec, including breaking changes

Created on 8 Dec 2017  路  6Comments  路  Source: jimkyndemeyer/js-graphql-intellij-plugin

As the GraphQL spec evolves, breaking changes are introduced. This includes:

  • Changes to directive locations
  • Doc strings
  • Validity of Introspection queries

To work properly across spec versions, the plugin and associated language service need to ship with a number of supported spec versions, and allow the developer to pick the one that their endpoint supports.

enhancement v2-architecture

Most helpful comment

@asiandrummer, @leebyron: I'm mentioning you guys here to get your thoughts on any established solutions for this.

I'm currently considering bundling a version of graphql-js for each published version of the GraphQL spec. Based on a configuration, the language service will then require the appropriate version for compatibility with the endpoint in use.

All 6 comments

@asiandrummer, @leebyron: I'm mentioning you guys here to get your thoughts on any established solutions for this.

I'm currently considering bundling a version of graphql-js for each published version of the GraphQL spec. Based on a configuration, the language service will then require the appropriate version for compatibility with the endpoint in use.

@jimkyndemeyer Have you condered doing it like the tslint plugin? They have a config option to select the location of the tslint js files which they load

any news on that @jimkyndemeyer ?

@waterfoul configuration is only a small part of this issue. Breaking changes can affect core functionalities such as the lexer, parser, completion, validation, introspection etc.

I'm currently experimenting with an approach that is similar to how the JavaScript tooling in IntelliJ works, namely by supporting multiple dialects (they have ES5, ES2015 etc.). This would also remove the need for a Node.js process handler and the reliance on the reference graphql-js implementation.

I'll update as things progress, but note that the time spent on this is carved out of my spare time.

Thanks for the update @jimkyndemeyer

Closing this in favor of #164.

v2 of the plugin will take the samme approach of the JavaScript tooling in IntelliJ, with the parser and lexer supporting the latest specs, and validation etc. built on top of that.

See the alpha release for current status: https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/releases/tag/2.0.0-alpha-2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pvm picture pvm  路  6Comments

MaxmaxmaximusAWS picture MaxmaxmaximusAWS  路  4Comments

Mischi picture Mischi  路  6Comments

MichaelDeBoey picture MichaelDeBoey  路  4Comments

thomastvedt picture thomastvedt  路  5Comments