cppgraphqlgen
cppgraphqlgen copied to clipboard
Failed to generate optionalNonNullArg of enum type
trafficstars
Hi, I tried using optionalNonNullArg as shown here: https://spec.graphql.org/October2021/#sel-JALTFFTB6CABABSnoI with enum type but schemagen failed with
terminate called after throwing an instance of 'std::out_of_range'
what(): map::at
Code sample to reproduce
enum optionalNonNullEnum {
One
Two
}
type optionalNonNullTest_1 {
test(arg: optionalNonNullEnum! = One) : Boolean!
}
Same error goes for custom input type:
input optionalNonNullInput {
testField: Int!
}
type optionalNonNullTest_2 {
test(arg: optionalNonNullInput! = {testField: 1}) : Boolean
}
Boolean/Int/String works fine.