You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.x Use JetBrains grammar-kit to support the GraphQL language natively inside the IntelliJ platform
No longer need a separate language service with its own eco-system to reduce complexity
Will use graphql-java as a native dependency for validation and schema type APIs
Possible now that graphql-java 8.0 added language support for SDL
Tasks
Validation
Completion based on schema type info
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.
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.
Limitations in 1.x and proposed solutions for 2.x
Only a single schema per-project
.graphqlconfigFile #125, Apollo Link State queries not supported #129, Save Schema if pulled from URL #140, Add support for Framework-specific Schema directives, e.g. Prisma #144, Allow having multiple configs in a project (scope per subfolder) #145Node.js + JavaScript plugin dependency
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:
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