I'm using GraphQl Codegen with the typescript
and typescript-operations
plugins, but the file generated contains a tone of Maybe and Scalars making the file look very messy.
export type Formation = {
availability?: Maybe<Scalars['String']>;
certificate?: Maybe<Scalars['String']>;
description?: Maybe<Scalars['String']>;
id: Scalars['ID'];
imageId?: Maybe<Scalars['ID']>;
imageUrl?: Maybe<Scalars['String']>;
languageIds?: Maybe<Array<Scalars['ID']>>;
languages?: Maybe<Array<Maybe<Taxonomy>>>;
levelId?: Maybe<Scalars['ID']>;
location?: Maybe<Taxonomy>;
locationId?: Maybe<Scalars['ID']>;
objective?: Maybe<Scalars['String']>;
professionIds?: Maybe<Array<Scalars['ID']>>;
requirementIds?: Maybe<Array<Scalars['ID']>>;
sectorIds?: Maybe<Array<Scalars['ID']>>;
tagIds: Array<Scalars['ID']>;
title: Scalars['String'];
typeId?: Maybe<Scalars['ID']>;
updatedAt: Scalars['String'];
urlFormation?: Maybe<Scalars['String']>;
};
Is it possible to output the primitive type:
string | null
Instead of:
Maybe<Scalars["String"]>
Thanks!