File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 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
6161 . export ( )
6262 . asKind ( 'function' )
6363 . 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 ;
6565 } ,
6666 ObjectTypeDefinition : ObjectTypeDefinitionBuilder ( config . withObjectType , ( node : ObjectTypeDefinitionNode ) => {
6767 const name = tsVisitor . convertName ( node . name . value ) ;
@@ -75,7 +75,7 @@ export const ZodSchemaVisitor = (schema: GraphQLSchema, config: ValidationSchema
7575 . withName ( `${ name } Schema(): z.ZodObject<Properties<${ name } >>` )
7676 . withBlock (
7777 [
78- indent ( `return z.object({` ) ,
78+ indent ( `return z.object<Properties< ${ name } >> ({` ) ,
7979 indent ( `__typename: z.literal('${ node . name . value } ').optional(),` , 2 ) ,
8080 shape ,
8181 indent ( '})' ) ,
You can’t perform that action at this time.
0 commit comments