You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing an application where I need to expose models containing Object fields through GraphQL. To properly handle these Object fields in my GraphQL schema, I've implemented a GraphQLSchema.Builder observer that registers ExtendedScalars.Object.
The GraphQL functionality works perfectly on its own. However, when I add the quarkus-smallrye-openapi extension (which I need for documenting a separate REST endpoint), the application fails to start. The failure occurs due to a type conflict, specifically around the Object type definition.
Expected behavior
Both extensions should work together without type conflicts, allowing the use of Object scalar in GraphQL schema while having OpenAPI documentation enabled.
Actual behavior
Using ExtendedScalars.Object to register Object scalar type in GraphQL schema works fine when only GraphQL extension is present
Caused by: graphql.AssertException: All types within a GraphQL schema must have unique names. No two provided types may have the same name.
No provided type may have a name which conflicts with any built in types (including Scalar and Introspection types).
You have redefined the type 'Object' from being a 'GraphQLObjectType' to a 'GraphQLScalarType'
Darwin XXX 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:02:41 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6030 arm64
Output of java -version
openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)
Quarkus version or git rev
3.19.2
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
I'm developing an application where I need to expose models containing Object fields through GraphQL. To properly handle these Object fields in my GraphQL schema, I've implemented a
GraphQLSchema.Builder
observer that registersExtendedScalars.Object
.The GraphQL functionality works perfectly on its own. However, when I add the
quarkus-smallrye-openapi
extension (which I need for documenting a separate REST endpoint), the application fails to start. The failure occurs due to a type conflict, specifically around theObject
type definition.Expected behavior
Both extensions should work together without type conflicts, allowing the use of Object scalar in GraphQL schema while having OpenAPI documentation enabled.
Actual behavior
ExtendedScalars.Object
to register Object scalar type in GraphQL schema works fine when only GraphQL extension is presentquarkus-smallrye-openapi
extension causes application startup failureHow to Reproduce?
Minimal reproducer project
https://github.com/alexfedorenchik/schema_issue
Output of
uname -a
orver
Darwin XXX 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:02:41 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6030 arm64
Output of
java -version
openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)
Quarkus version or git rev
3.19.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.12
Additional information
Ugly workaround
The text was updated successfully, but these errors were encountered: