Skip to content

Commit accd108

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents cd3e6fb + ca916fe commit accd108

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ It provides the following features in IntelliJ IDEA, WebStorm, RubyMine, PhpStor
1616

1717
It depends on [js-graphql-language-service](https://github.com/jimkyndemeyer/js-graphql-language-service) that it manages using a Node.js process handler.
1818

19+
## Documentation
20+
21+
The plugin uses a `graphql.config.json` file in the project root to configure the location of your GraphQL schema.
22+
23+
To get started, please see the [FAQ](#faq).
24+
1925
## Features demo
2026

2127
**Schema setup, completion, error highlighting, documentation**
@@ -26,6 +32,24 @@ It depends on [js-graphql-language-service](https://github.com/jimkyndemeyer/js-
2632

2733
## FAQ
2834

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+
2953
**Which IDEs are compatible with the plugin?**
3054

3155
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
4266

4367
**Note**: The experimental version in the `android-studio` branch is not available from the JetBrains Plugin Repository.
4468

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.
54-
5569
## License
5670
MIT

0 commit comments

Comments
 (0)