Skip to content

Commit 4c5c84c

Browse files
Introduce inputMaybeValue configuration for typescript-related plugins (#6815)
Co-authored-by: Dotan Simha <dotansimha@gmail.com>
1 parent 04e2d83 commit 4c5c84c

File tree

76 files changed

+699
-519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+699
-519
lines changed

‎.changeset/thirty-dodos-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-codegen/typescript': minor
3+
---
4+
5+
Added InputMaybe, a different type of Maybe type for input/arguments

‎dev-test/githunt/__generated__/comment.query.stencil-component.tsx

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

‎dev-test/githunt/__generated__/feed.query.stencil-component.tsx

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

‎dev-test/githunt/jit-sdk.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { compileQuery, isCompiledQuery } from 'graphql-jit';
33
import { AggregateError, isAsyncIterable, mapAsyncIterator } from '@graphql-tools/utils';
44
import gql from 'graphql-tag';
55
export type Maybe<T> = T | null;
6+
export type InputMaybe<T> = Maybe<T>;
67
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
78
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
89
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
@@ -55,8 +56,8 @@ export type Entry = {
5556

5657
/** Information about a GitHub repository submitted to GitHunt */
5758
export type EntryCommentsArgs = {
58-
limit?: Maybe<Scalars['Int']>;
59-
offset?: Maybe<Scalars['Int']>;
59+
limit?: InputMaybe<Scalars['Int']>;
60+
offset?: InputMaybe<Scalars['Int']>;
6061
};
6162

6263
/** A list of options for the sort order of the feed */
@@ -108,8 +109,8 @@ export type QueryEntryArgs = {
108109
};
109110

110111
export type QueryFeedArgs = {
111-
limit?: Maybe<Scalars['Int']>;
112-
offset?: Maybe<Scalars['Int']>;
112+
limit?: InputMaybe<Scalars['Int']>;
113+
offset?: InputMaybe<Scalars['Int']>;
113114
type: FeedType;
114115
};
115116

@@ -189,8 +190,8 @@ export type OnCommentAddedSubscription = {
189190

190191
export type CommentQueryVariables = Exact<{
191192
repoFullName: Scalars['String'];
192-
limit?: Maybe<Scalars['Int']>;
193-
offset?: Maybe<Scalars['Int']>;
193+
limit?: InputMaybe<Scalars['Int']>;
194+
offset?: InputMaybe<Scalars['Int']>;
194195
}>;
195196

196197
export type CommentQuery = {
@@ -263,8 +264,8 @@ export type FeedEntryFragment = {
263264

264265
export type FeedQueryVariables = Exact<{
265266
type: FeedType;
266-
offset?: Maybe<Scalars['Int']>;
267-
limit?: Maybe<Scalars['Int']>;
267+
offset?: InputMaybe<Scalars['Int']>;
268+
limit?: InputMaybe<Scalars['Int']>;
268269
}>;
269270

270271
export type FeedQuery = {

‎dev-test/githunt/typed-document-nodes.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
22
export type Maybe<T> = T | null;
3+
export type InputMaybe<T> = Maybe<T>;
34
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
45
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
56
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
@@ -52,8 +53,8 @@ export type Entry = {
5253

5354
/** Information about a GitHub repository submitted to GitHunt */
5455
export type EntryCommentsArgs = {
55-
limit?: Maybe<Scalars['Int']>;
56-
offset?: Maybe<Scalars['Int']>;
56+
limit?: InputMaybe<Scalars['Int']>;
57+
offset?: InputMaybe<Scalars['Int']>;
5758
};
5859

5960
/** A list of options for the sort order of the feed */
@@ -105,8 +106,8 @@ export type QueryEntryArgs = {
105106
};
106107

107108
export type QueryFeedArgs = {
108-
limit?: Maybe<Scalars['Int']>;
109-
offset?: Maybe<Scalars['Int']>;
109+
limit?: InputMaybe<Scalars['Int']>;
110+
offset?: InputMaybe<Scalars['Int']>;
110111
type: FeedType;
111112
};
112113

@@ -186,8 +187,8 @@ export type OnCommentAddedSubscription = {
186187

187188
export type CommentQueryVariables = Exact<{
188189
repoFullName: Scalars['String'];
189-
limit?: Maybe<Scalars['Int']>;
190-
offset?: Maybe<Scalars['Int']>;
190+
limit?: InputMaybe<Scalars['Int']>;
191+
offset?: InputMaybe<Scalars['Int']>;
191192
}>;
192193

193194
export type CommentQuery = {
@@ -260,8 +261,8 @@ export type FeedEntryFragment = {
260261

261262
export type FeedQueryVariables = Exact<{
262263
type: FeedType;
263-
offset?: Maybe<Scalars['Int']>;
264-
limit?: Maybe<Scalars['Int']>;
264+
offset?: InputMaybe<Scalars['Int']>;
265+
limit?: InputMaybe<Scalars['Int']>;
265266
}>;
266267

267268
export type FeedQuery = {

‎dev-test/githunt/types.apolloAngular.sdk.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
33
import * as Apollo from 'apollo-angular';
44
import * as ApolloCore from '@apollo/client/core';
55
export type Maybe<T> = T | null;
6+
export type InputMaybe<T> = Maybe<T>;
67
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
78
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
89
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
@@ -55,8 +56,8 @@ export type Entry = {
5556

5657
/** Information about a GitHub repository submitted to GitHunt */
5758
export type EntryCommentsArgs = {
58-
limit?: Maybe<Scalars['Int']>;
59-
offset?: Maybe<Scalars['Int']>;
59+
limit?: InputMaybe<Scalars['Int']>;
60+
offset?: InputMaybe<Scalars['Int']>;
6061
};
6162

6263
/** A list of options for the sort order of the feed */
@@ -108,8 +109,8 @@ export type QueryEntryArgs = {
108109
};
109110

110111
export type QueryFeedArgs = {
111-
limit?: Maybe<Scalars['Int']>;
112-
offset?: Maybe<Scalars['Int']>;
112+
limit?: InputMaybe<Scalars['Int']>;
113+
offset?: InputMaybe<Scalars['Int']>;
113114
type: FeedType;
114115
};
115116

@@ -189,8 +190,8 @@ export type OnCommentAddedSubscription = {
189190

190191
export type CommentQueryVariables = Exact<{
191192
repoFullName: Scalars['String'];
192-
limit?: Maybe<Scalars['Int']>;
193-
offset?: Maybe<Scalars['Int']>;
193+
limit?: InputMaybe<Scalars['Int']>;
194+
offset?: InputMaybe<Scalars['Int']>;
194195
}>;
195196

196197
export type CommentQuery = {
@@ -263,8 +264,8 @@ export type FeedEntryFragment = {
263264

264265
export type FeedQueryVariables = Exact<{
265266
type: FeedType;
266-
offset?: Maybe<Scalars['Int']>;
267-
limit?: Maybe<Scalars['Int']>;
267+
offset?: InputMaybe<Scalars['Int']>;
268+
limit?: InputMaybe<Scalars['Int']>;
268269
}>;
269270

270271
export type FeedQuery = {

‎dev-test/githunt/types.apolloAngular.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { gql } from 'apollo-angular';
22
import { Injectable } from '@angular/core';
33
import * as Apollo from 'apollo-angular';
44
export type Maybe<T> = T | null;
5+
export type InputMaybe<T> = Maybe<T>;
56
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
67
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
78
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
@@ -54,8 +55,8 @@ export type Entry = {
5455

5556
/** Information about a GitHub repository submitted to GitHunt */
5657
export type EntryCommentsArgs = {
57-
limit?: Maybe<Scalars['Int']>;
58-
offset?: Maybe<Scalars['Int']>;
58+
limit?: InputMaybe<Scalars['Int']>;
59+
offset?: InputMaybe<Scalars['Int']>;
5960
};
6061

6162
/** A list of options for the sort order of the feed */
@@ -107,8 +108,8 @@ export type QueryEntryArgs = {
107108
};
108109

109110
export type QueryFeedArgs = {
110-
limit?: Maybe<Scalars['Int']>;
111-
offset?: Maybe<Scalars['Int']>;
111+
limit?: InputMaybe<Scalars['Int']>;
112+
offset?: InputMaybe<Scalars['Int']>;
112113
type: FeedType;
113114
};
114115

@@ -188,8 +189,8 @@ export type OnCommentAddedSubscription = {
188189

189190
export type CommentQueryVariables = Exact<{
190191
repoFullName: Scalars['String'];
191-
limit?: Maybe<Scalars['Int']>;
192-
offset?: Maybe<Scalars['Int']>;
192+
limit?: InputMaybe<Scalars['Int']>;
193+
offset?: InputMaybe<Scalars['Int']>;
193194
}>;
194195

195196
export type CommentQuery = {
@@ -262,8 +263,8 @@ export type FeedEntryFragment = {
262263

263264
export type FeedQueryVariables = Exact<{
264265
type: FeedType;
265-
offset?: Maybe<Scalars['Int']>;
266-
limit?: Maybe<Scalars['Int']>;
266+
offset?: InputMaybe<Scalars['Int']>;
267+
limit?: InputMaybe<Scalars['Int']>;
267268
}>;
268269

269270
export type FeedQuery = {

‎dev-test/githunt/types.avoidOptionals.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export type Maybe<T> = T | null;
2+
export type InputMaybe<T> = Maybe<T>;
23
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
34
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
45
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
@@ -51,8 +52,8 @@ export type Entry = {
5152

5253
/** Information about a GitHub repository submitted to GitHunt */
5354
export type EntryCommentsArgs = {
54-
limit: Maybe<Scalars['Int']>;
55-
offset: Maybe<Scalars['Int']>;
55+
limit: InputMaybe<Scalars['Int']>;
56+
offset: InputMaybe<Scalars['Int']>;
5657
};
5758

5859
/** A list of options for the sort order of the feed */
@@ -104,8 +105,8 @@ export type QueryEntryArgs = {
104105
};
105106

106107
export type QueryFeedArgs = {
107-
limit: Maybe<Scalars['Int']>;
108-
offset: Maybe<Scalars['Int']>;
108+
limit: InputMaybe<Scalars['Int']>;
109+
offset: InputMaybe<Scalars['Int']>;
109110
type: FeedType;
110111
};
111112

@@ -182,8 +183,8 @@ export type OnCommentAddedSubscription = {
182183

183184
export type CommentQueryVariables = Exact<{
184185
repoFullName: Scalars['String'];
185-
limit: Maybe<Scalars['Int']>;
186-
offset: Maybe<Scalars['Int']>;
186+
limit: InputMaybe<Scalars['Int']>;
187+
offset: InputMaybe<Scalars['Int']>;
187188
}>;
188189

189190
export type CommentQuery = {
@@ -249,8 +250,8 @@ export type FeedEntryFragment = {
249250

250251
export type FeedQueryVariables = Exact<{
251252
type: FeedType;
252-
offset: Maybe<Scalars['Int']>;
253-
limit: Maybe<Scalars['Int']>;
253+
offset: InputMaybe<Scalars['Int']>;
254+
limit: InputMaybe<Scalars['Int']>;
254255
}>;
255256

256257
export type FeedQuery = {

‎dev-test/githunt/types.d.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export type Maybe<T> = T | null;
2+
export type InputMaybe<T> = Maybe<T>;
23
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
34
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
45
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
@@ -51,8 +52,8 @@ export type Entry = {
5152

5253
/** Information about a GitHub repository submitted to GitHunt */
5354
export type EntryCommentsArgs = {
54-
limit?: Maybe<Scalars['Int']>;
55-
offset?: Maybe<Scalars['Int']>;
55+
limit?: InputMaybe<Scalars['Int']>;
56+
offset?: InputMaybe<Scalars['Int']>;
5657
};
5758

5859
/** A list of options for the sort order of the feed */
@@ -103,8 +104,8 @@ export type QueryEntryArgs = {
103104
};
104105

105106
export type QueryFeedArgs = {
106-
limit?: Maybe<Scalars['Int']>;
107-
offset?: Maybe<Scalars['Int']>;
107+
limit?: InputMaybe<Scalars['Int']>;
108+
offset?: InputMaybe<Scalars['Int']>;
108109
type: FeedType;
109110
};
110111

@@ -180,8 +181,8 @@ export type OnCommentAddedSubscription = {
180181

181182
export type CommentQueryVariables = Exact<{
182183
repoFullName: Scalars['String'];
183-
limit?: Maybe<Scalars['Int']>;
184-
offset?: Maybe<Scalars['Int']>;
184+
limit?: InputMaybe<Scalars['Int']>;
185+
offset?: InputMaybe<Scalars['Int']>;
185186
}>;
186187

187188
export type CommentQuery = {
@@ -254,8 +255,8 @@ export type FeedEntryFragment = {
254255

255256
export type FeedQueryVariables = Exact<{
256257
type: FeedType;
257-
offset?: Maybe<Scalars['Int']>;
258-
limit?: Maybe<Scalars['Int']>;
258+
offset?: InputMaybe<Scalars['Int']>;
259+
limit?: InputMaybe<Scalars['Int']>;
259260
}>;
260261

261262
export type FeedQuery = {

‎dev-test/githunt/types.enumsAsTypes.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export type Maybe<T> = T | null;
2+
export type InputMaybe<T> = Maybe<T>;
23
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
34
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
45
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
@@ -51,8 +52,8 @@ export type Entry = {
5152

5253
/** Information about a GitHub repository submitted to GitHunt */
5354
export type EntryCommentsArgs = {
54-
limit?: Maybe<Scalars['Int']>;
55-
offset?: Maybe<Scalars['Int']>;
55+
limit?: InputMaybe<Scalars['Int']>;
56+
offset?: InputMaybe<Scalars['Int']>;
5657
};
5758

5859
/** A list of options for the sort order of the feed */
@@ -103,8 +104,8 @@ export type QueryEntryArgs = {
103104
};
104105

105106
export type QueryFeedArgs = {
106-
limit?: Maybe<Scalars['Int']>;
107-
offset?: Maybe<Scalars['Int']>;
107+
limit?: InputMaybe<Scalars['Int']>;
108+
offset?: InputMaybe<Scalars['Int']>;
108109
type: FeedType;
109110
};
110111

@@ -180,8 +181,8 @@ export type OnCommentAddedSubscription = {
180181

181182
export type CommentQueryVariables = Exact<{
182183
repoFullName: Scalars['String'];
183-
limit?: Maybe<Scalars['Int']>;
184-
offset?: Maybe<Scalars['Int']>;
184+
limit?: InputMaybe<Scalars['Int']>;
185+
offset?: InputMaybe<Scalars['Int']>;
185186
}>;
186187

187188
export type CommentQuery = {
@@ -254,8 +255,8 @@ export type FeedEntryFragment = {
254255

255256
export type FeedQueryVariables = Exact<{
256257
type: FeedType;
257-
offset?: Maybe<Scalars['Int']>;
258-
limit?: Maybe<Scalars['Int']>;
258+
offset?: InputMaybe<Scalars['Int']>;
259+
limit?: InputMaybe<Scalars['Int']>;
259260
}>;
260261

261262
export type FeedQuery = {

0 commit comments

Comments
 (0)