-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL client: support for Union type #43756
Comments
/cc @jmartisk (graphql), @phillip-kruger (graphql) |
At the end this issue probably boils down to upgrading smallrye to 2.10.0 My tests without Quarkus (based on See code: https://github.com/jmini/quarkus-experiments/tree/main/quarkus43756_smallrye-graphql-client |
Gradle magic 🎉 This seems to work in my //upgrade 'smallrye-graphql-*' projects, see https://github.com/quarkusio/quarkus/issues/43756
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'io.smallrye' && details.requested.name.startsWith('smallrye-graphql') && details.requested.version == '2.9.2') {
details.useVersion '2.10.0'
details.because 'See issue #43756'
}
}
} Not sure what is the recommended Quarkus way of requiring a lib version is that is newer than what is in the BOM |
Yeah I don't know, I generally don't recommend that, because the Quarkus Maven resolver does its own magic that may break it, and there may be various incompatibilities. But if it works for you, then fine. |
Indeed the version is already updated on the quarkus/bom/application/pom.xml Line 59 in 6543030
|
Describe the bug
Given the GraphQL server having a
UNION
type with multiplepossibleType
Example: https://github.com/jmini/quarkus-graphql-superheroes/ (this one is implemented with Quarkus but it is the same with other server implementation)
Complete schema
At client side this is a valid GraphQL request:
Which can be modeled with an
Ability
interface and 2 classes implementing the interfaceAttribute
andSuperpower
:Java code of the model
Complete example
The generated query by the quarkus graphql client is problematic (check the
TRACE
log entries):complete quarkus (graphql client app) logs
The error comes from the generated request, it contains:
Which generate an error at
Unparseable input document
at server side (response from the server, can also be seen in theTRACE
entry).Other server implementation returns:
But this is due to the same error.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
21
Quarkus version or git rev
3.15.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.9
Additional information
No response
The text was updated successfully, but these errors were encountered: