Is your feature request related to a problem? Please describe.
I would to add avoidOptionals: true only for operations types not for the scheme types
Describe the solution you'd like
with the avoidOptionals: false my output looks like this
// type for `User`
export type User = {
__typename?: 'User';
_description?: Maybe<Scalars['String']>;
avatar?: Maybe<File>;
createdAt?: Maybe<Scalars['DateTime']>;
createdBy?: Maybe<User>;
deletedAt?: Maybe<Scalars['Int']>;
email?: Maybe<Scalars['String']>;
firstName?: Maybe<Scalars['String']>;
id?: Maybe<Scalars['ID']>;
is8base?: Maybe<Scalars['Boolean']>;
lastName?: Maybe<Scalars['String']>;
learningMode?: Maybe<Scalars['Boolean']>;
origin?: Maybe<Scalars['String']>;
permissions?: Maybe<UserPermissionList>;
roles?: Maybe<RoleListResponse>;
status?: Maybe<Scalars['String']>;
timezone?: Maybe<Scalars['String']>;
typeUser?: Maybe<Scalars['String']>;
updatedAt?: Maybe<Scalars['DateTime']>;
};
// A type generated for the query to that User resource
export type UserSessionQuery = {
__typename?: 'Query';
user?: Maybe<{
__typename?: 'User';
id?: Maybe<string>;
email?: Maybe<string>;
typeUser?: Maybe<string>;
avatar?: Maybe<{ __typename?: 'File'; shareUrl?: Maybe<string> }>;
}>;
};
What i like to have is this
// type for `User` with optonals
export type User = {
__typename?: 'User';
_description?: Maybe<Scalars['String']>;
avatar?: Maybe<File>;
createdAt?: Maybe<Scalars['DateTime']>;
createdBy?: Maybe<User>;
deletedAt?: Maybe<Scalars['Int']>;
email?: Maybe<Scalars['String']>;
firstName?: Maybe<Scalars['String']>;
id?: Maybe<Scalars['ID']>;
is8base?: Maybe<Scalars['Boolean']>;
lastName?: Maybe<Scalars['String']>;
learningMode?: Maybe<Scalars['Boolean']>;
origin?: Maybe<Scalars['String']>;
permissions?: Maybe<UserPermissionList>;
roles?: Maybe<RoleListResponse>;
status?: Maybe<Scalars['String']>;
timezone?: Maybe<Scalars['String']>;
typeUser?: Maybe<Scalars['String']>;
updatedAt?: Maybe<Scalars['DateTime']>;
};
// The operations types without optionals
export type UserSessionQuery = {
__typename?: 'Query';
user: Maybe<{
__typename?: 'User';
id: Maybe<string>;
email: Maybe<string>;
typeUser: Maybe<string>;
avatar: Maybe<{ __typename?: 'File'; shareUrl: Maybe<string> }>;
}>;
};
Describe alternatives you've considered
maybe other name for the config that will apply for then operations like avoidOperationsOptionals
Additional context
Is your feature request related to a problem? Please describe.
I would to add
avoidOptionals: trueonly for operations types not for the scheme typesDescribe the solution you'd like
with the
avoidOptionals: falsemy output looks like thisWhat i like to have is this
Describe alternatives you've considered
maybe other name for the config that will apply for then operations like
avoidOperationsOptionalsAdditional context