Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit 3d8f891

Browse files
authored
fix: useSchemaDefinitionFiles typo (#223)
* fix: schemaFileDefinitions typo * chore: update readme, fix typo
1 parent 2fad94e commit 3d8f891

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,30 @@ Notice that `documents` key supports glob pattern and hence `["**/*.graphql"]` i
127127
### Go to definition is using `generated_schema.graphql`, not my schema source files
128128

129129
Ah yes, this is now the default behavior used by most users, who do not have source SDL files.
130-
If you're using an "SDL first" methodology, such as with apollo, you'll want to enable `useSchemaFileDefinition`.
130+
If you're using an "SDL first" methodology, such as with apollo, you'll want to enable `useSchemaFileDefinitions`.
131131
Add this to your settings:
132132

133133
```json
134-
"vscode-graphql.useSchemaFileDefinition": true,
134+
"vscode-graphql.useSchemaFileDefinitions": true,
135+
```
136+
137+
you can also use graphql config if you need to mix and match these settings:
138+
139+
```yml
140+
projects:
141+
project1:
142+
schema: project1/schema/schema.graphql
143+
documents: project1/queries/**/*.{graphql,tsx,jsx,ts,js}
144+
extensions:
145+
languageService:
146+
useSchemaFileDefinitions: true
147+
project2:
148+
schema: https://api.spacex.land/graphql/
149+
documents: project2/queries.graphql
150+
extensions:
151+
endpoints:
152+
default:
153+
url: https://api.spacex.land/graphql/
135154
```
136155
137156
### The extension fails with errors about duplicate types

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"description": "Show codelens to execute operations inline",
110110
"default": true
111111
},
112-
"vscode-graphql.useSchemaFileDefinition": {
112+
"vscode-graphql.useSchemaFileDefinitions": {
113113
"type": [
114114
"boolean"
115115
],
@@ -202,7 +202,7 @@
202202
"dotenv": "^8.2.0",
203203
"graphql": "^15.3.0",
204204
"graphql-config": "^3.0.3",
205-
"graphql-language-service-server": "^2.5.3",
205+
"graphql-language-service-server": "^2.5.4",
206206
"graphql-tag": "^2.11.0",
207207
"node-fetch": "^2.6.0",
208208
"ovsx": "0.1.0-next.dacd2fd",

0 commit comments

Comments
 (0)