GeezerVison is showing github.com — Does graphql-java-tools support the "@oneOf" directive? · graphql-java-kickstart/graphql-java-tools · Discussion #755
Does graphql-java-tools support the "@oneOf" directive?
#755
Jul 26, 2023
·
0 comments
Discussion options
-
Uh oh!
There was an error while loading. Please reload this page.
|
I can't seem to find a strait forward answer online:
Let's say this is the pertinent part of my schema:
input CustomStringAttributeInput {
name: String!
value: String!
}
input CustomBooleanAttributeInput {
name: String!
value: Boolean!
}
input CustomAttributeInput @oneOf {
boolean: CustomBooleanAttributeInput
string: CustomStringAttributeInput
}
When I attempt to use CustomAttributeInput in a query or mutation I get:
Exception in thread "main" graphql.kickstart.tools.SchemaError: Expected type 'CustomBooleanAttributeInput' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
I've used graphql-java-tools long enough to know that error message may be incorrect. I seemed to have the right classes, with the right hierarchy and the correct getters and setters.
I will make a small standalone sample to share. But if anyone can answer whether or not graphql-java-tools (and graphql-java) support this directive in the first place, it would be very helpful.
|
You must be logged in to vote