graphql-language-service-cli 3.2.19 → 3.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -37,13 +37,13 @@ Only node 9 or greater, and npm or yarn are required dependencies.
|
|
|
37
37
|
|
|
38
38
|
with `yarn`:
|
|
39
39
|
|
|
40
|
-
```
|
|
40
|
+
```sh
|
|
41
41
|
yarn global add graphql-language-service-cli
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
with `npm`:
|
|
45
45
|
|
|
46
|
-
```
|
|
46
|
+
```sh
|
|
47
47
|
npm i -g graphql-language-service-cli
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -58,16 +58,39 @@ The custom graphql language configurations are:
|
|
|
58
58
|
- `customDirectives` - `['@myExampleDirective']`
|
|
59
59
|
- `customValidationRules` - returns rules array with parameter `ValidationContext` from `graphql/validation`
|
|
60
60
|
|
|
61
|
-
###
|
|
61
|
+
### LSP Workspace Configuration
|
|
62
62
|
|
|
63
|
-
`graphql-
|
|
63
|
+
When running `server`, your LSP-compatible client can [provide additional workspace configuration](https://npmjs.com/graphql-language-service-server#workspace-configuration).
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
For example, `coc.nvim` allows for providing custom `settings`
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
"languageserver": {
|
|
69
|
+
"graphql": {
|
|
70
|
+
"command": "graphql-lsp",
|
|
71
|
+
"args": ["server", "-m", "stream"],
|
|
72
|
+
// customize filetypes to your needs
|
|
73
|
+
"filetypes": ["typescript", "typescriptreact", "graphql"],
|
|
74
|
+
"settings": {
|
|
75
|
+
"graphql-config.load.legacy": true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
66
80
|
|
|
81
|
+
this would allow for legacy `graphql-config` file formats like `.graphqlconfig`, useful on projects maintaining compatibility with the intellij plugin
|
|
82
|
+
|
|
83
|
+
### Using the command-line interface
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
graphql-lsp server --schema=localhost:3000
|
|
67
87
|
```
|
|
68
88
|
|
|
69
|
-
|
|
89
|
+
The node executable contains several commands: `server` and the command-line language service methods (`validate`, `autocomplete`, `outline`).
|
|
90
|
+
|
|
91
|
+
### CLI Options
|
|
70
92
|
|
|
93
|
+
```
|
|
71
94
|
Usage: graphql-lsp <command> <file>
|
|
72
95
|
|
|
73
96
|
[-h | --help][-c | --configdir] {configDir}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphql-language-service-cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.20",
|
|
4
4
|
"description": "An interface for building GraphQL language services for IDEs",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Hyohyeon Jeong <asiandrummer@fb.com>",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/polyfill": "^7.8.7",
|
|
35
|
-
"graphql-language-service": "^5.0.
|
|
36
|
-
"graphql-language-service-server": "^2.7.
|
|
35
|
+
"graphql-language-service": "^5.0.2",
|
|
36
|
+
"graphql-language-service-server": "^2.7.19",
|
|
37
37
|
"yargs": "^16.2.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|