Following the steps outlined here: How To Generate TypeScript Types From GraphQL - DatoCMS I have set up a codegen script to generate a types file. That’s all working nicely!
However, some of the generated types have some issues:
export enum CategoryModelOrderBy {
CreatedAtAsc = '_createdAt_ASC',
CreatedAtDesc = '_createdAt_DESC',
FirstPublishedAtAsc = '_firstPublishedAt_ASC',
FirstPublishedAtDesc = '_firstPublishedAt_DESC',
IsValidAsc = '_isValid_ASC',
IsValidDesc = '_isValid_DESC',
PublicationScheduledAtAsc = '_publicationScheduledAt_ASC',
PublicationScheduledAtDesc = '_publicationScheduledAt_DESC',
PublishedAtAsc = '_publishedAt_ASC',
PublishedAtDesc = '_publishedAt_DESC',
StatusAsc = '_status_ASC',
StatusDesc = '_status_DESC',
UnpublishingScheduledAtAsc = '_unpublishingScheduledAt_ASC',
UnpublishingScheduledAtDesc = '_unpublishingScheduledAt_DESC',
UpdatedAtAsc = '_updatedAt_ASC',
UpdatedAtDesc = '_updatedAt_DESC',
CategoryIdAsc = 'categoryId_ASC',
CategoryIdDesc = 'categoryId_DESC',
CreatedAtAsc = 'createdAt_ASC',
CreatedAtDesc = 'createdAt_DESC',
IdAsc = 'id_ASC',
IdDesc = 'id_DESC',
TitleAsc = 'title_ASC',
TitleDesc = 'title_DESC',
UpdatedAtAsc = 'updatedAt_ASC',
UpdatedAtDesc = 'updatedAt_DESC'
}
As you can see there are multiple enum keys for UpdatedAtAsc
(and the other system fields), with multiple possible values, so this may have unpredictable behaviour.