Skip to content

Commit ee2276c

Browse files
authored
[client-preset] Include undefined for inputMaybeValue explicitly (#10393)
* Allow undefined in inputMaybeValue * Fix unit tests * Fix dev example tests * Add changeset
1 parent 24ea486 commit ee2276c

File tree

25 files changed

+54
-45
lines changed

25 files changed

+54
-45
lines changed

.changeset/nasty-sloths-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-codegen/client-preset': patch
3+
---
4+
5+
Include undefined explicitly for input maybe value in Client Preset

dev-test/gql-tag-operations-masking/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

dev-test/gql-tag-operations-urql/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

dev-test/gql-tag-operations/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

dev-test/gql-tag-operations/graphql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

examples/persisted-documents-string-mode/src/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { DocumentTypeDecoration } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

examples/persisted-documents/src/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

examples/react/apollo-client-defer/src/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

examples/react/apollo-client-swc-plugin/src/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

examples/react/apollo-client/src/gql/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
33
export type Maybe<T> = T | null;
4-
export type InputMaybe<T> = Maybe<T>;
4+
export type InputMaybe<T> = T | null | undefined;
55
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
66
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
77
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };

0 commit comments

Comments
 (0)