File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export const ZodSchemaVisitor = (schema: GraphQLSchema, config: ValidationSchema
61
61
. export ( )
62
62
. asKind ( 'function' )
63
63
. withName ( `${ name } Schema(): z.ZodObject<Properties<${ name } >>` )
64
- . withBlock ( [ indent ( `return z.object({` ) , shape , indent ( '})' ) ] . join ( '\n' ) ) . string ;
64
+ . withBlock ( [ indent ( `return z.object<Properties< ${ name } >> ({` ) , shape , indent ( '})' ) ] . join ( '\n' ) ) . string ;
65
65
} ,
66
66
ObjectTypeDefinition : ObjectTypeDefinitionBuilder ( config . withObjectType , ( node : ObjectTypeDefinitionNode ) => {
67
67
const name = tsVisitor . convertName ( node . name . value ) ;
@@ -75,7 +75,7 @@ export const ZodSchemaVisitor = (schema: GraphQLSchema, config: ValidationSchema
75
75
. withName ( `${ name } Schema(): z.ZodObject<Properties<${ name } >>` )
76
76
. withBlock (
77
77
[
78
- indent ( `return z.object({` ) ,
78
+ indent ( `return z.object<Properties< ${ name } >> ({` ) ,
79
79
indent ( `__typename: z.literal('${ node . name . value } ').optional(),` , 2 ) ,
80
80
shape ,
81
81
indent ( '})' ) ,
You can’t perform that action at this time.
0 commit comments