I have an input type that says:
input testInput {
a: String
b: String
c: Boolean
}
I have a situation where field c can be either String or Boolean.
How can i implement the field c that will accept both String and Boolean ?
I have an input type that says:
input testInput {
a: String
b: String
c: Boolean
}
I have a situation where field c can be either String or Boolean.
How can i implement the field c that will accept both String and Boolean ?
Graphql does not support union of scalar types. So you can modify it this way
input testInput { a: String b: String c: hybridType }
type cBoolean { content: Boolean }
type cString { content: String }
union hybridType = cBoolean | cString