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
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,26 +11,31 @@ The plugin works out of the box with popular GraphQL clients such as [Apollo Gra
11
11
The plugin is published to the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/8097-js-graphql).
12
12
You can install it directly from your IDE via the `File | Settings/Preferences | Plugins` screen.
13
13
On the `Marketplace` tab simply search for `graphql` and select the `GraphQL` suggestion:
14
+
14
15

15
16
## Developer guide
16
17
This developer guide covers how to setup your project to get the most out of the GraphQL language tooling in this plugin.
17
18
18
19
The main features of the plugin are:
19
20
- Full language support for GraphQL Specification including the Schema Definition Language (SDL)
20
21
- Schema-aware completion, error highlighting, code-formatting, folding, commenter, and brace-matching and documentation
22
+
21
23

22
24
23
25

24
26
- The plugin [discovers your local schema](#project-structure-and-schema-discovery) on the fly. Remote schemas are easily fetched using introspection. Introspect GraphQL endpoints to generate schema declaration files using the GraphQL Type System Definition Language
25
27
- Support for [multi-schema projects](#setting-up-multi-schema-projects-using-graphql-config) using configurable project scopes or graphql-config files Schema discovery is configured using [graphql-config v2](https://github.com/kamilkisiela/graphql-config/tree/legacy) files, including support for multi-schema projects
26
28
- Built-in support for [Relay](https://facebook.github.io/relay/) and [Apollo](https://www.apollographql.com/) projects: `graphql` and `gql` tagged template literals in JavaScript and TypeScript are automatically recognized as GraphQL
27
29
- Execute queries using variables against configurable endpoints, including support for custom headers and environment variables
30
+
28
31

29
32
-`Find Usages` and `Go to Declaration` for schema types, fields, and fragments
33
+
30
34

31
35
-`Structure view` to navigate GraphQL files
32
36
- Load variables from shell or `.env` files. Supported file names: `.env.local`,`.env.development.local`,`.env.development`,`.env.dev.local`,`.env.dev`,`.env`
33
37
- Built-in Relay and Apollo Federation type definitions (You need to enable it in settings)
38
+
34
39

35
40
36
41
The most important aspect of using the plugin is to configure how schema types are discovered. If the schema types are not discovered correctly, language features such as completion and error highlighting will be based on the wrong type information.
@@ -101,12 +106,14 @@ See https://github.com/kamilkisiela/graphql-config/tree/legacy#specifying-endpoi
101
106
102
107
The following example is from graphql-config-examples/remote-schema-introspection
103
108
It demonstrates how to use the endpoints configured in `.graphqlconfig` to fetch an existing remote schema.
109
+
104
110

105
111
With `introspect: true` the plugin asks at project startup whether to update the local schema using the configured endpoint.
106
112
107
113
The update works by sending an introspection query to the endpoint, and then writing the result to the configured schemaPath.
108
114
109
115
Introspection queries can also be executed by double-clicking endpoints in the schemas tree view:
- If you're both developing the server schema and consuming it in a client, e.g. via component queries, you'll get the best tooling by having your schema expressed using GraphQL Schema Definition Language directly in your project. With that setup the plugin immediately discovers your schema, and you don't have to perform an introspection after server schema changes.
0 commit comments