Skip to content

Preserve Kotlin list-item nullability inside Uni wrappers#2563

Open
MdTanwer wants to merge 1 commit into
smallrye:mainfrom
MdTanwer:fix-kotlin-uni-list-nullability
Open

Preserve Kotlin list-item nullability inside Uni wrappers#2563
MdTanwer wants to merge 1 commit into
smallrye:mainfrom
MdTanwer:fix-kotlin-uni-list-nullability

Conversation

@MdTanwer

@MdTanwer MdTanwer commented Jul 11, 2026

Copy link
Copy Markdown

Summary

  • Fix Kotlin GraphQL schema generation so Uni<List<String>> (and similar Mutiny/CompletionStage wrappers) keeps list-item nullability from Kotlin metadata, producing [String!]! instead of [String]!.
  • Recursively apply nullability across the wrapper chain in OperationCreator, while still only letting collection-like argument wrappers control argument-level nullability.
  • Update Field.getGraphQLType() to skip non-collection wrappers when rendering nested list types, and add schema-builder coverage for the Uni+List nullability matrix.

Fixes: quarkusio/quarkus#48350

Kotlin metadata was only inspected at the first wrapper level, so
Uni<List<String>> lost item nullability and became [String]! instead of
[String!]!. Walk the full wrapper chain and teach getGraphQLType() to
skip non-collection wrappers when rendering nested lists.

Fixes: quarkusio/quarkus#48350
@MdTanwer
MdTanwer force-pushed the fix-kotlin-uni-list-nullability branch from d34b748 to 508b36e Compare July 11, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphQL Kotlin list item nullability is lost with Mutiny

1 participant