File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export const YupSchemaVisitor = (
3535 return [ importYup ] ;
3636 } ,
3737 InputObjectTypeDefinition : ( node : InputObjectTypeDefinitionNode ) => {
38- const name = node . name . value ;
38+ const name = tsVisitor . convertName ( node . name . value ) ;
3939 importTypes . push ( name ) ;
4040
4141 const shape = node . fields
@@ -53,7 +53,7 @@ export const YupSchemaVisitor = (
5353 ) . string ;
5454 } ,
5555 EnumTypeDefinition : ( node : EnumTypeDefinitionNode ) => {
56- const enumname = node . name . value ;
56+ const enumname = tsVisitor . convertName ( node . name . value ) ;
5757 importTypes . push ( enumname ) ;
5858
5959 if ( config . enumsAsTypes ) {
@@ -161,12 +161,12 @@ const generateNameNodeYupSchema = (
161161 const typ = schema . getType ( node . value ) ;
162162
163163 if ( typ && typ . astNode ?. kind === "InputObjectTypeDefinition" ) {
164- const enumName = typ . astNode . name . value ;
164+ const enumName = tsVisitor . convertName ( typ . astNode . name . value ) ;
165165 return `${ enumName } Schema()` ;
166166 }
167167
168168 if ( typ && typ . astNode ?. kind === "EnumTypeDefinition" ) {
169- const enumName = typ . astNode . name . value ;
169+ const enumName = tsVisitor . convertName ( typ . astNode . name . value ) ;
170170 return `${ enumName } Schema` ;
171171 }
172172
Original file line number Diff line number Diff line change @@ -60,4 +60,15 @@ input EventArgumentInput {
6060 value : String !
6161}
6262
63- scalar Date
63+ input HTTPInput {
64+ method : HTTPMethod
65+ url : URL !
66+ }
67+
68+ enum HTTPMethod {
69+ GET
70+ POST
71+ }
72+
73+ scalar Date
74+ scalar URL
You can’t perform that action at this time.
0 commit comments