Skip to content

[v2] Main issue for tracking progress on the v2 branch #164

@jimkyndemeyer

Description

@jimkyndemeyer

Limitations in 1.x and proposed solutions for 2.x

Only a single schema per-project

Node.js + JavaScript plugin dependency

  • 1.x Due to these dependencies the plugin is unavailable for IDEs such as Android Studio
  • 2.x Will no longer use an external language service, and JavaScript functionality will be marked "optional" in plugin.xml

Changes to spec, grammar, and language difficult to support in the plugin

Developer experience with 2.x

The biggest change with 2.x is making the GraphQL Schema Definition Language (often abbreviated SDL) a first-class citizen in the plugin and not just a read-only view of the schema.

SDL has become part of the spec in graphql/graphql-spec#90 and is already widely adopted by the community for schema authoring.

A widely used example is the Apollo project where the schema is expressed using SDL inside a gql tagged template literal (https://www.apollographql.com/docs/apollo-server/v2/essentials/server.html)

With this in mind, 2.x of the plugin will provide first-class tooling support for writing SDL, including:

  • Completion on types when defining fields, arguments, implemented interfaces etc.
  • Error highlighting of schema errors such as unknown types, wrong use of types, missing fields when implementing interfaces
  • Find usages in SDL and refactoring such as rename which will update the relevant queries, mutations etc.

Any changes to the SDL type definitions will be immediately reflected in the relevant GraphQL queries and other operations within the given scope. This removes the manual step of having to either trigger an introspection query, or update a single combined .graphql schema file as required in 1.x of the plugin.

Overall, developers should be able to much more productive writing schema using SDL.

Documentation (work in progress)

https://gist.github.com/jimkyndemeyer/1903b65ff892f0811e76f16d8b530848

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions