-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 Scheme Generation adds type subfix (like "_Int") #28249
Comments
/cc @jmartisk, @phillip-kruger |
It's because you extends a type with a generic int type. This is how we handle generics in graphql |
ok thank you. |
Is this documented somewhere (e.g. in a changelog)? |
Hi @peschee @ daviddavidgit, not in a changelog a.f.a.i.k. It's been in for a while, so you must be changing from a very old version ? It was not really a change, but rather a new feature: "Support generics" (smallrye/smallrye-graphql#281) |
According to my small reproducer this feature seems to be added since Quarkus 2.10.0. |
I'll have a look, maybe support for interfaces/ abstract objects was added. In either way, what you see as the output is the correct generation. |
Hmmm, to me, it doesn't sound right that we append the type parameter to the name. Or is there a particular reason? |
@jmartisk maybe check what changes in the version mentioned. I do recall bugs logged about this, especially w.r.t mongo usage. But that feels longer ago |
Describe the bug
Graphql schema generation adds a type subfix (like "_Int") at the generated schema type names.
I have following classes (taken from SmallRye GraphQL extension guide)
Accessing the schema through the introspect gives not the expected schema.
Expected behavior
Output of Introspect:
Actual behavior
Output of Introspect:
How to Reproduce?
I have created a small reproducer: https://github.com/daviddavidgit/quarkus-simple-graphql-schema-generation
It is based on: https://quarkus.io/guides/smallrye-graphql
Output of
uname -a
orver
Linux david-ThinkPad-X1-Extreme-Gen-3 5.14.0-1051-oem #58-Ubuntu SMP Fri Aug 26 05:50:00 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.16" 2022-07-19 OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu122.04) OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.10.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6
Additional information
With Quarkus 2.9.0 it still worked.
With Quarkus 2.12.3 it does not work.
The problem might be in the SchemaPrinter of graphql-java.
The text was updated successfully, but these errors were encountered: