@graphql-codegen/typescript-operations 4.6.0-alpha-20250326170219-2d6a95a011bf64b69b6ba1e41af1b08aea090a5c → 4.6.0
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/package.json +3 -3
- package/typings/config.d.cts +7 -1
- package/typings/config.d.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-operations",
|
|
3
|
-
"version": "4.6.0
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"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 || ^16.0.0",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-codegen/plugin-helpers": "^5.1.0",
|
|
11
|
-
"@graphql-codegen/typescript": "4.1.6
|
|
12
|
-
"@graphql-codegen/visitor-plugin-common": "5.8.0
|
|
11
|
+
"@graphql-codegen/typescript": "^4.1.6",
|
|
12
|
+
"@graphql-codegen/visitor-plugin-common": "5.8.0",
|
|
13
13
|
"auto-bind": "~4.0.0",
|
|
14
14
|
"tslib": "~2.6.0"
|
|
15
15
|
},
|
package/typings/config.d.cts
CHANGED
|
@@ -291,8 +291,14 @@ export interface TypeScriptDocumentsPluginConfig extends RawDocumentsConfig {
|
|
|
291
291
|
* @description Options related to handling nullability
|
|
292
292
|
* @exampleMarkdown
|
|
293
293
|
* ## `errorHandlingClient`
|
|
294
|
+
* An error handling client is a client which prevents the user from reading a `null` used as a placeholder for an error in a GraphQL response.
|
|
295
|
+
* The client may do so by throwing when an errored field is accessed (as is the case for [`graphql-toe`](https://github.com/graphile/graphql-toe)),
|
|
296
|
+
* or when a fragment containing an error is read (as is the case for Relay's `@throwOnFieldError` directive),
|
|
297
|
+
* or by preventing any data from being read if an error occurred (as with Apollo Client's `errorPolicy: "none"`).
|
|
298
|
+
*
|
|
294
299
|
* When using error handling clients, a semantic non-nullable field can never be `null`.
|
|
295
|
-
* If a field
|
|
300
|
+
* If a semantic non-nullable field's value in the response is `null`, there must be a respective error.
|
|
301
|
+
* The error handling client will throw in this case, so the `null` value is never read.
|
|
296
302
|
*
|
|
297
303
|
* To enable this option, install `graphql-sock` peer dependency:
|
|
298
304
|
*
|
package/typings/config.d.ts
CHANGED
|
@@ -291,8 +291,14 @@ export interface TypeScriptDocumentsPluginConfig extends RawDocumentsConfig {
|
|
|
291
291
|
* @description Options related to handling nullability
|
|
292
292
|
* @exampleMarkdown
|
|
293
293
|
* ## `errorHandlingClient`
|
|
294
|
+
* An error handling client is a client which prevents the user from reading a `null` used as a placeholder for an error in a GraphQL response.
|
|
295
|
+
* The client may do so by throwing when an errored field is accessed (as is the case for [`graphql-toe`](https://github.com/graphile/graphql-toe)),
|
|
296
|
+
* or when a fragment containing an error is read (as is the case for Relay's `@throwOnFieldError` directive),
|
|
297
|
+
* or by preventing any data from being read if an error occurred (as with Apollo Client's `errorPolicy: "none"`).
|
|
298
|
+
*
|
|
294
299
|
* When using error handling clients, a semantic non-nullable field can never be `null`.
|
|
295
|
-
* If a field
|
|
300
|
+
* If a semantic non-nullable field's value in the response is `null`, there must be a respective error.
|
|
301
|
+
* The error handling client will throw in this case, so the `null` value is never read.
|
|
296
302
|
*
|
|
297
303
|
* To enable this option, install `graphql-sock` peer dependency:
|
|
298
304
|
*
|