File tree Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ input TodoListRelationFilterInput {
178178}
179179
180180input TodoCursorInput {
181- id : ID
181+ id : ID !
182182 createdAt : DateTime
183183 description : String
184184 priority : Int
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ input TodoListRelationFilterInput {
5050}
5151
5252input TodoCursorInput {
53- id : ID
53+ id : ID !
5454 createdAt : DateTime
5555 description : String
5656 priority : Int
@@ -126,7 +126,7 @@ input TagListInput {
126126}
127127
128128input TagCursorInput {
129- id : ID
129+ id : ID !
130130 title : String
131131}
132132
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type { InputValueDefinitionNode } from 'graphql'
66import { invoke } from '@txe/invoke'
77import { Kind } from 'graphql'
88import type { Mutable } from '#package/utils/mutable.js'
9+ import type { NamedTypeNode } from 'graphql'
910import type { ObjectTypeDefinitionNode } from 'graphql'
1011import { parse } from 'graphql'
1112import { printSchema } from 'graphql'
@@ -602,10 +603,21 @@ function createListInput(
602603 {
603604 kind : Kind . INPUT_VALUE_DEFINITION ,
604605 name : { kind : Kind . NAME , value : field . name . value } ,
605- type : {
606- kind : Kind . NAMED_TYPE ,
607- name : { kind : Kind . NAME , value : fieldType . name . value } ,
608- } ,
606+ type : invoke ( ( ) => {
607+ const type : NamedTypeNode = {
608+ kind : Kind . NAMED_TYPE ,
609+ name : { kind : Kind . NAME , value : fieldType . name . value } ,
610+ }
611+
612+ if ( field . name . value === 'id' ) {
613+ return {
614+ kind : Kind . NON_NULL_TYPE ,
615+ type,
616+ }
617+ }
618+
619+ return type
620+ } ) ,
609621 } ,
610622 ]
611623 } ) ,
You can’t perform that action at this time.
0 commit comments