WebStorm
 
Get WebStorm

GraphQL

Last modified: 09 July 2024

With WebStorm, you can use a GraphQL plugin that supports the GraphQL language. The following functionality is available:

  • Full language support for GraphQL Specification including the Schema Definition Language (SDL).

  • Schema-aware completion, error highlighting, and documentation.

  • Syntax highlighting, code-formatting, folding, commenter, and brace-matching.

  • Detecting your local schema on the fly. Remote schemas are easily fetched using introspection. You can introspect GraphQL endpoints to generate schema declaration files using the GraphQL Type System Definition Language.

  • Support for multi-schema projects using configurable project scopes or graphql-config files. Schema discovery is configured using graphql-config files, which includes support for multi-schema projects.

  • Built-in support for Apollo GraphQL and Relay projects: graphql and gql tagged template literals in JavaScript and TypeScript are automatically recognized as GraphQL.

  • Executing queries using variables against configurable endpoints, including support for custom headers and environment variables.

  • Find Usages and Go to Declaration for schema types, fields, and fragments.

  • Structure view to navigate GraphQL files.

  • Loading variables from shell, .env files or setup them manually per configuration file.

  • Built-in Relay, Federation, and Apollo Kotlin type definitions (you need to enable them in Settings | Languages & Frameworks | GraphQL).

GraphQL is supported through a dedicated GraphQL plugin, which is available from the JetBrains Marketplace.