Skip to content

Commit 1d7c643

Browse files
authoredAug 11, 2020
Upgrade @graphql-toos/ packages, fixes for versioning issues (#4553)
* versioning fixes, docs fixes * added changesets * fix changesets file
1 parent 816ff1e commit 1d7c643

33 files changed

+953
-364
lines changed
 

‎.changeset/forty-weeks-kneel.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
'@graphql-codegen/cli': patch
3+
'@graphql-codegen/core': patch
4+
'@graphql-codegen/flow-resolvers': patch
5+
'@graphql-codegen/schema-ast': patch
6+
'@graphql-codegen/visitor-plugin-common': patch
7+
'@graphql-codegen/typescript-mongodb': patch
8+
'@graphql-codegen/typescript-resolvers': patch
9+
'@graphql-codegen/plugin-helpers': patch
10+
'@graphql-cli/codegen': patch
11+
'@graphql-codegen/c-sharp': patch
12+
'@graphql-codegen/c-sharp-operations': patch
13+
'@graphql-codegen/flow': patch
14+
'@graphql-codegen/flow-operations': patch
15+
'@graphql-codegen/java-apollo-android': patch
16+
'@graphql-codegen/java-common': patch
17+
'@graphql-codegen/java': patch
18+
'@graphql-codegen/kotlin': patch
19+
'@graphql-codegen/java-resolvers': patch
20+
'@graphql-codegen/add': patch
21+
'@graphql-codegen/fragment-matcher': patch
22+
'@graphql-codegen/introspection': patch
23+
'@graphql-codegen/jsdoc': patch
24+
'@graphql-codegen/time': patch
25+
'@graphql-codegen/typescript-apollo-angular': patch
26+
'@graphql-codegen/typescript-compatibility': patch
27+
'@graphql-codegen/typescript-document-nodes': patch
28+
'@graphql-codegen/typescript-generic-sdk': patch
29+
'@graphql-codegen/typescript-graphql-files-modules': patch
30+
'@graphql-codegen/typescript-graphql-request': patch
31+
'@graphql-codegen/named-operations-object': patch
32+
'@graphql-codegen/typescript-oclif': patch
33+
'@graphql-codegen/typescript-operations': patch
34+
'@graphql-codegen/typescript-react-apollo': patch
35+
'@graphql-codegen/typescript-react-offix': patch
36+
'@graphql-codegen/typescript-stencil-apollo': patch
37+
'@graphql-codegen/typescript-type-graphql': patch
38+
'@graphql-codegen/typed-document-node': patch
39+
'@graphql-codegen/typescript': patch
40+
'@graphql-codegen/typescript-urql': patch
41+
'@graphql-codegen/typescript-vue-apollo': patch
42+
'@graphql-codegen/import-types-preset': patch
43+
'@graphql-codegen/near-operation-file-preset': patch
44+
'@graphql-codegen/config-schema': patch
45+
---
46+
47+
Bump all packages to allow "^" in deps and fix compatibility issues

‎.changeset/funny-scissors-sip.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
'@graphql-codegen/cli': patch
3+
'@graphql-codegen/core': patch
4+
'@graphql-codegen/flow-resolvers': patch
5+
'@graphql-codegen/schema-ast': patch
6+
'@graphql-codegen/visitor-plugin-common': patch
7+
'@graphql-codegen/typescript-mongodb': patch
8+
'@graphql-codegen/typescript-resolvers': patch
9+
'@graphql-codegen/plugin-helpers': patch
10+
'@graphql-cli/codegen': patch
11+
'@graphql-codegen/c-sharp': patch
12+
'@graphql-codegen/c-sharp-operations': patch
13+
'@graphql-codegen/flow': patch
14+
'@graphql-codegen/flow-operations': patch
15+
'@graphql-codegen/java-apollo-android': patch
16+
'@graphql-codegen/java-common': patch
17+
'@graphql-codegen/java': patch
18+
'@graphql-codegen/kotlin': patch
19+
'@graphql-codegen/java-resolvers': patch
20+
'@graphql-codegen/add': patch
21+
'@graphql-codegen/fragment-matcher': patch
22+
'@graphql-codegen/introspection': patch
23+
'@graphql-codegen/jsdoc': patch
24+
'@graphql-codegen/time': patch
25+
'@graphql-codegen/typescript-apollo-angular': patch
26+
'@graphql-codegen/typescript-compatibility': patch
27+
'@graphql-codegen/typescript-document-nodes': patch
28+
'@graphql-codegen/typescript-generic-sdk': patch
29+
'@graphql-codegen/typescript-graphql-files-modules': patch
30+
'@graphql-codegen/typescript-graphql-request': patch
31+
'@graphql-codegen/named-operations-object': patch
32+
'@graphql-codegen/typescript-oclif': patch
33+
'@graphql-codegen/typescript-operations': patch
34+
'@graphql-codegen/typescript-react-apollo': patch
35+
'@graphql-codegen/typescript-react-offix': patch
36+
'@graphql-codegen/typescript-stencil-apollo': patch
37+
'@graphql-codegen/typescript-type-graphql': patch
38+
'@graphql-codegen/typed-document-node': patch
39+
'@graphql-codegen/typescript': patch
40+
'@graphql-codegen/typescript-urql': patch
41+
'@graphql-codegen/typescript-vue-apollo': patch
42+
'@graphql-codegen/import-types-preset': patch
43+
'@graphql-codegen/near-operation-file-preset': patch
44+
'@graphql-codegen/config-schema': patch
45+
---
46+
47+
Bump versions of @graphql-tools/ packages to fix issues with loading schemas and SDL comments

‎package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@
4545
"@apollo/client": "3.1.2",
4646
"@babel/preset-typescript": "7.10.4",
4747
"@changesets/cli": "2.9.2",
48-
"@graphql-tools/apollo-engine-loader": "6.0.15",
49-
"@graphql-tools/code-file-loader": "6.0.15",
50-
"@graphql-tools/git-loader": "6.0.15",
51-
"@graphql-tools/github-loader": "6.0.15",
52-
"@graphql-tools/graphql-file-loader": "6.0.15",
53-
"@graphql-tools/json-file-loader": "6.0.15",
54-
"@graphql-tools/load": "6.0.15",
55-
"@graphql-tools/prisma-loader": "6.0.15",
56-
"@graphql-tools/url-loader": "6.0.15",
57-
"@graphql-tools/utils": "6.0.15",
48+
"@graphql-tools/apollo-engine-loader": "6.0.18",
49+
"@graphql-tools/code-file-loader": "6.0.18",
50+
"@graphql-tools/git-loader": "6.0.18",
51+
"@graphql-tools/github-loader": "6.0.18",
52+
"@graphql-tools/graphql-file-loader": "6.0.18",
53+
"@graphql-tools/json-file-loader": "6.0.18",
54+
"@graphql-tools/load": "6.0.18",
55+
"@graphql-tools/prisma-loader": "6.0.18",
56+
"@graphql-tools/url-loader": "6.0.18",
57+
"@graphql-tools/utils": "6.0.18",
5858
"@graphql-typed-document-node/core": "3.0.0",
5959
"@types/common-tags": "1.8.0",
6060
"@types/glob": "7.1.3",

‎packages/graphql-codegen-cli/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@
4242
"dependencies": {
4343
"@graphql-codegen/core": "1.17.7",
4444
"@graphql-codegen/plugin-helpers": "^1.17.7",
45-
"@graphql-tools/apollo-engine-loader": "^6.0.0",
46-
"@graphql-tools/code-file-loader": "^6.0.0",
47-
"@graphql-tools/git-loader": "^6.0.0",
48-
"@graphql-tools/github-loader": "^6.0.0",
49-
"@graphql-tools/graphql-file-loader": "^6.0.0",
50-
"@graphql-tools/json-file-loader": "^6.0.0",
51-
"@graphql-tools/load": "^6.0.0",
52-
"@graphql-tools/prisma-loader": "^6.0.0",
53-
"@graphql-tools/url-loader": "^6.0.0",
54-
"@graphql-tools/utils": "^6.0.0",
45+
"@graphql-tools/apollo-engine-loader": "^6.0.18",
46+
"@graphql-tools/code-file-loader": "^6.0.18",
47+
"@graphql-tools/git-loader": "^6.0.18",
48+
"@graphql-tools/github-loader": "^6.0.18",
49+
"@graphql-tools/graphql-file-loader": "^6.0.18",
50+
"@graphql-tools/json-file-loader": "^6.0.18",
51+
"@graphql-tools/load": "^6.0.18",
52+
"@graphql-tools/prisma-loader": "^6.0.18",
53+
"@graphql-tools/url-loader": "^6.0.18",
54+
"@graphql-tools/utils": "^6.0.18",
5555
"ansi-escapes": "^4.3.1",
5656
"camel-case": "^4.1.1",
5757
"chalk": "^4.1.0",

‎packages/graphql-codegen-core/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
},
4040
"dependencies": {
4141
"@graphql-codegen/plugin-helpers": "^1.17.7",
42-
"@graphql-tools/merge": "^6.0.0",
43-
"@graphql-tools/utils": "^6.0.0",
42+
"@graphql-tools/merge": "^6.0.18",
43+
"@graphql-tools/utils": "^6.0.18",
4444
"tslib": "~2.0.0"
4545
},
4646
"main": "dist/index.cjs.js",

‎packages/plugins/flow/resolvers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@graphql-codegen/flow": "^1.17.7",
1818
"@graphql-codegen/plugin-helpers": "^1.17.7",
1919
"@graphql-codegen/visitor-plugin-common": "^1.17.7",
20-
"@graphql-tools/utils": "^6.0.0",
20+
"@graphql-tools/utils": "^6.0.18",
2121
"auto-bind": "~4.0.0",
2222
"tslib": "~2.0.0"
2323
},

‎packages/plugins/other/schema-ast/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"@graphql-codegen/plugin-helpers": "^1.17.7",
18-
"@graphql-tools/utils": "^6.0.0",
18+
"@graphql-tools/utils": "^6.0.18",
1919
"tslib": "~2.0.0"
2020
},
2121
"peerDependencies": {

‎packages/plugins/other/visitor-plugin-common/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@graphql-codegen/plugin-helpers": "^1.17.7",
17-
"@graphql-tools/relay-operation-optimizer": "6.0.15",
17+
"@graphql-tools/relay-operation-optimizer": "^6.0.18",
1818
"array.prototype.flatmap": "^1.2.3",
1919
"auto-bind": "~4.0.0",
2020
"dependency-graph": "^0.9.0",

‎packages/plugins/typescript/mongodb/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@graphql-codegen/plugin-helpers": "^1.17.7",
1818
"@graphql-codegen/typescript": "^1.17.7",
1919
"@graphql-codegen/visitor-plugin-common": "^1.17.7",
20-
"@graphql-tools/utils": "^6.0.0",
20+
"@graphql-tools/utils": "^6.0.18",
2121
"auto-bind": "~4.0.0",
2222
"lodash": "~4.17.15",
2323
"tslib": "~2.0.0"

‎packages/plugins/typescript/resolvers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@graphql-codegen/plugin-helpers": "^1.17.7",
1818
"@graphql-codegen/typescript": "^1.17.7",
1919
"@graphql-codegen/visitor-plugin-common": "^1.17.7",
20-
"@graphql-tools/utils": "^6.0.0",
20+
"@graphql-tools/utils": "^6.0.18",
2121
"auto-bind": "~4.0.0",
2222
"tslib": "~2.0.0"
2323
},

‎packages/utils/plugins-helpers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
1818
},
1919
"dependencies": {
20-
"@graphql-tools/utils": "^6.0.0",
20+
"@graphql-tools/utils": "^6.0.18",
2121
"camel-case": "4.1.1",
2222
"common-tags": "1.8.0",
2323
"constant-case": "3.0.3",

‎packages/utils/plugins-helpers/src/types.ts

+92-2
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,105 @@ export namespace Types {
8989
[url: string]: UrlSchemaOptions;
9090
}
9191

92-
export type LocalSchemaPath = string;
92+
/**
93+
* @additionalProperties false
94+
* @description Loads a schema a local file or files, with customized options for parsing/loading.
95+
*/
96+
export interface LocalSchemaPathOptions {
97+
/**
98+
* @description Skips checks for graphql-import syntax and loads the file as-is, without imports support.
99+
* @default true
100+
*/
101+
skipGraphQLImport?: boolean;
102+
103+
/**
104+
* @description Converts all GraphQL comments (`#` sign) to descriptions during the parse phase, to make it available
105+
* for plugins later.
106+
* @default false
107+
*/
108+
commentDescriptions?: boolean;
109+
110+
/**
111+
* When building a schema from a GraphQL service's introspection result, it
112+
* might be safe to assume the schema is valid. Set to true to assume the
113+
* produced schema is valid.
114+
*
115+
* @default false
116+
*/
117+
assumeValid?: boolean;
118+
119+
/**
120+
* Set to true to assume the SDL is valid.
121+
*
122+
* @default false
123+
*/
124+
assumeValidSDL?: boolean;
125+
126+
/**
127+
* By default, the parser creates AST nodes that know the location
128+
* in the source that they correspond to. This configuration flag
129+
* disables that behavior for performance or testing.
130+
*
131+
* @default false
132+
*/
133+
noLocation?: boolean;
134+
135+
/**
136+
* If enabled, the parser will parse empty fields sets in the Schema
137+
* Definition Language. Otherwise, the parser will follow the current
138+
* specification.
139+
*
140+
* This option is provided to ease adoption of the final SDL specification
141+
* and will be removed in v16.
142+
*
143+
* @default false
144+
*/
145+
allowLegacySDLEmptyFields?: boolean;
146+
147+
/**
148+
* If enabled, the parser will parse implemented interfaces with no `&`
149+
* character between each interface. Otherwise, the parser will follow the
150+
* current specification.
151+
*
152+
* This option is provided to ease adoption of the final SDL specification
153+
* and will be removed in v16.
154+
*
155+
* @default false
156+
*/
157+
allowLegacySDLImplementsInterfaces?: boolean;
158+
159+
/**
160+
* EXPERIMENTAL:
161+
*
162+
* If enabled, the parser will understand and parse variable definitions
163+
* contained in a fragment definition. They'll be represented in the
164+
* `variableDefinitions` field of the FragmentDefinitionNode.
165+
*
166+
* The syntax is identical to normal, query-defined variables. For example:
167+
*
168+
* fragment A($var: Boolean = false) on T {
169+
* ...
170+
* }
171+
*
172+
* Note: this feature is experimental and may change or be removed in the
173+
* future.
174+
*
175+
* @default false
176+
*/
177+
experimentalFragmentVariables?: boolean;
178+
}
179+
export interface LocalSchemaPathWithOptions {
180+
[globPath: string]: LocalSchemaPathOptions;
181+
}
182+
93183
export type SchemaGlobPath = string;
94184
/**
95185
* @description A URL to your GraphQL endpoint, a local path to `.graphql` file, a glob pattern to your GraphQL schema files, or a JavaScript file that exports the schema to generate code from. This can also be an array which specifies multiple schemas to generate code from. You can read more about the supported formats [here](schema-field#available-formats).
96186
*/
97187
export type Schema =
98188
| string
99189
| UrlSchemaWithOptions
100-
| LocalSchemaPath
190+
| LocalSchemaPathWithOptions
101191
| SchemaGlobPath
102192
| SchemaWithLoader
103193
| SchemaFromCodeFile;

‎website/docs/generated-config/c-sharp-operations.md

+14
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,20 @@ config:
310310
typesPrefix: I
311311
```
312312

313+
### `typesSuffix`
314+
315+
type: `string`
316+
default: ``
317+
318+
Suffixes all the generated types.
319+
320+
#### Usage Examples
321+
322+
```yml
323+
config:
324+
typesSuffix: I
325+
```
326+
313327
### `skipTypename`
314328

315329
type: `boolean`

‎website/docs/generated-config/c-sharp.md

+14
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,20 @@ config:
156156
typesPrefix: I
157157
```
158158

159+
### `typesSuffix`
160+
161+
type: `string`
162+
default: ``
163+
164+
Suffixes all the generated types.
165+
166+
#### Usage Examples
167+
168+
```yml
169+
config:
170+
typesSuffix: I
171+
```
172+
159173
### `skipTypename`
160174

161175
type: `boolean`

‎website/docs/generated-config/java-apollo-android.md

+14
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,20 @@ config:
146146
typesPrefix: I
147147
```
148148

149+
### `typesSuffix`
150+
151+
type: `string`
152+
default: ``
153+
154+
Suffixes all the generated types.
155+
156+
#### Usage Examples
157+
158+
```yml
159+
config:
160+
typesSuffix: I
161+
```
162+
149163
### `skipTypename`
150164

151165
type: `boolean`

0 commit comments

Comments
 (0)
Please sign in to comment.