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
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,12 @@ It provides the following features in IntelliJ IDEA, WebStorm, RubyMine, PhpStor
16
16
17
17
It depends on [js-graphql-language-service](https://github.com/jimkyndemeyer/js-graphql-language-service) that it manages using a Node.js process handler.
18
18
19
+
## Documentation
20
+
21
+
The plugin uses a `graphql.config.json` file in the project root to configure the location of your GraphQL schema.
@@ -26,6 +32,24 @@ It depends on [js-graphql-language-service](https://github.com/jimkyndemeyer/js-
26
32
27
33
## FAQ
28
34
35
+
**How do I configure the plugin in a project**
36
+
37
+
The plugin is activated as soon as you view or edit GraphQL in the editor. This includes GraphQL inside `Relay.QL` and `gql` templates in JavaScript and TypeScript. You can also use `.graphql` physical files and scratch files. These files allow you to query your endpoint directly from your IDE.
38
+
39
+
An editor notification bar should prompt you to "Create a graphql.config.json". Accept and edit this config file to point the plugin at your local `schema.json` or your endpoint for introspection. The plugin uses the schema to provide completion and error highlighting.
40
+
41
+
**How do I reload a GraphQL Schema that was loaded from a URL?**
42
+
43
+
In the the GraphQL tool window, select the "Current Errors" tab and click the "Restart JS GraphQL Language Service" button.
44
+
45
+
**I clicked "No thanks" when asked to create a graphql.config.json. Now what?**
46
+
47
+
Download [graphql.config.json](https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/blob/master/resources/META-INF/graphql.config.json) from this repository and place it in your project root (next to your package.json for JS projects). Re-open the project and edit `graphql.config.json` to point the plugin at your schema.
48
+
49
+
**Fields are shown as errors with "Cannot query field..." messages**
50
+
51
+
Make sure you've edited your `graphql.config.json` to point it at your schema. This enables the plugin to properly recognize the available types and their fields.
52
+
29
53
**Which IDEs are compatible with the plugin?**
30
54
31
55
The plugin is compatible with version 143+ of IntelliJ IDEA, WebStorm, RubyMine, PhpStorm, and PyCharm.
@@ -42,15 +66,5 @@ To install it, open "Settings", "Plugins", "Browse repositories..." and search f
42
66
43
67
**Note**: The experimental version in the `android-studio` branch is not available from the JetBrains Plugin Repository.
44
68
45
-
**How do I configure the plugin in a project**
46
-
47
-
The plugin is activated as soon as you view or edit GraphQL in the editor. This includes GraphQL inside `Relay.QL` and `gql` templates in JavaScript and TypeScript. You can also use `.graphql` physical files and scratch files. These files allow you to query your endpoint directly from your IDE.
48
-
49
-
An editor notification bar should prompt you to "Create a graphql.config.json". Accept and edit this config file to point the plugin at your local `schema.json` or your endpoint for introspection. The plugin uses the schema to provide completion and error highlighting.
50
-
51
-
**How do I reload a GraphQL Schema that was loaded from a URL?**
52
-
53
-
In the the GraphQL tool window, select the "Current Errors" tab and click the "Restart JS GraphQL Language Service" button.
0 commit comments