Skip to content

Commit 5cd96ec

Browse files
author
Kumar Harsh
committed
fix(readme): re-update readme with new instructions
1 parent 63b72c1 commit 5cd96ec

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,40 @@ VSCode extension for GraphQL schema authoring & consumption.
1111

1212
## What's in the Box?
1313
* **Go to Definition**: Just <kbd>F12</kbd> or <kbd>Ctrl</kbd>+Click on any graphql type, and you'll jump right to it's definition.
14-
![Go to Definition](https://cdn.rawgit.com/kumarharsh/graphql-for-vscode/master/images/goto-definition.gif)
14+
15+
![Go to Definition](https://cdn.rawgit.com/kumarharsh/graphql-for-vscode/master/images/goto-definition.gif)
1516
* **Schema Validation**: The plugin also validates your schema, so that you catch errors early.
1617
* **Autocomplete**: You also get full cross-file autocomplete support.
17-
![Autocomplete](https://cdn.rawgit.com/kumarharsh/graphql-for-vscode/master/images/autocomplete.gif)
18+
19+
![Autocomplete](https://cdn.rawgit.com/kumarharsh/graphql-for-vscode/master/images/autocomplete.gif)
1820
* **Great Syntax Highlighting**: Now, your gql files will look as beautiful as your other code with an awesome syntax highlighter which works not just with your schema files, but also within your Javascript/Typescript files.
1921
* **Linting**: This plugin uses a similar method as used by the [Codemirror graphql](https://github.com/graphql/codemirror-graphql) project for linting.
2022
* **Snippets**: Some commonly used snippets are provided which help while writing mutations and queries, such as definiting types, interfaces and input types.
21-
* Autocomplete: Uses the [@playlyfe/gql](npmjs.org/package/@playlyfe/gql) library to read your whole graphql schema definitions and provide you with autocomplete support while writing & editing your `.gql` files.
23+
* **Autocomplete**: Uses the [@playlyfe/gql](npmjs.org/package/@playlyfe/gql) library to read your whole graphql schema definitions and provide you with autocomplete support while writing & editing your `.gql` files.
2224

2325
## Setting it Up
2426
1. Ensure that you have the [@playlyfe/gql](npmjs.org/package/@playlyfe/gql) library installed and available to this plugin. If you've installed the library in a folder other than the workspace root, then add the path to the node_modules directory as a setting:
25-
```json
26-
{
27-
"graphqlForVSCode.nodePath": "ui/node_modules"
28-
}
29-
```
27+
```json
28+
{
29+
"graphqlForVSCode.nodePath": "ui/node_modules"
30+
}
31+
```
3032

3133
2. Ensure you have [watchman](https://facebook.github.io/watchman/docs/install.html) installed and available in your path. Watchman watches your gql files and provides up-to-date suggestions. For users on Windows, get the latest build mentioned in [this issue](https://github.com/facebook/watchman/issues/19) and add the location of `watchman.exe` to your environment path.
3234

35+
3. Create a .gqlconfig file (required by the `@playlyfe/gql` package). Example:
36+
The .gqlconfig is a JSON file with only one required key: schema.files which is the path to your *.gql files relative to your workspace root.
37+
```json
38+
/* .gqlconfig */
39+
{
40+
"schema": {
41+
"files": "schemas/**/*.gql"
42+
}
43+
}
44+
```
45+
You can use the string `files: "**/*.gql"` instead if you want to find any `.gql` file recursively in the workspace dir.
46+
47+
3348
## Future Plans
3449
* Improved Linting: Since graphql schemas can be written in multiple .gql files, so cross-file linting should be available. I'm not sure of the implementation as of now though.
3550
* Tests: Figure out tests.

0 commit comments

Comments
 (0)