@@ -511,39 +511,6 @@ describe('zod', () => {
511511 } ) ;
512512
513513 describe ( 'with withObjectType' , ( ) => {
514- const schema = buildSchema ( /* GraphQL */ `
515- input ScalarsInput {
516- date: Date!
517- email: Email
518- }
519- scalar Date
520- scalar Email
521- input UserCreateInput {
522- name: String!
523- email: Email!
524- }
525- type User {
526- id: ID!
527- name: String
528- age: Int
529- email: Email
530- isMember: Boolean
531- createdAt: Date!
532- }
533-
534- type Mutation {
535- _empty: String
536- }
537-
538- type Query {
539- _empty: String
540- }
541-
542- type Subscription {
543- _empty: String
544- }
545- ` ) ;
546-
547514 it ( 'not generate if withObjectType false' , async ( ) => {
548515 const schema = buildSchema ( /* GraphQL */ `
549516 type User {
@@ -612,6 +579,10 @@ describe('zod', () => {
612579 date: Date!
613580 email: Email!
614581 }
582+ input UsernameUpdateInput {
583+ updateInputId: ID!
584+ updateName: String!
585+ }
615586 type User {
616587 id: ID!
617588 name: String
@@ -643,6 +614,12 @@ describe('zod', () => {
643614 Date : 'z.date()' ,
644615 Email : 'z.string().email()' ,
645616 } ,
617+ scalars : {
618+ ID : {
619+ input : 'number' ,
620+ output : 'string' ,
621+ } ,
622+ } ,
646623 } ,
647624 { }
648625 ) ;
@@ -652,6 +629,10 @@ describe('zod', () => {
652629 'name: z.string(),' ,
653630 'date: z.date(),' ,
654631 'email: z.string().email()' ,
632+ // Username Update Input
633+ 'export function UsernameUpdateInputSchema(): z.ZodObject<Properties<UsernameUpdateInput>> {' ,
634+ 'updateInputId: z.number(),' ,
635+ 'updateName: z.string()' ,
655636 // User
656637 'export function UserSchema(): z.ZodObject<Properties<User>> {' ,
657638 "__typename: z.literal('User').optional()" ,
0 commit comments