Skip to content
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

Problems with annotations like nonnull and lists in kotlin #2142

Open
robp94 opened this issue Jul 3, 2024 · 0 comments
Open

Problems with annotations like nonnull and lists in kotlin #2142

robp94 opened this issue Jul 3, 2024 · 0 comments

Comments

@robp94
Copy link
Contributor

robp94 commented Jul 3, 2024

Follow-up issue of #1366

There seems to be a discrepancy between client and server

@Query
fun test2(list: List<@NonNull String>): String

@Query
fun test3(list: @NonNull List<@NonNull String>): String

result in schema

test2(list: [String!]!): String
test3(list: [String!]!): String

But both test fail with

Variable type '[String!]' doesn't match expected type '[String!]!

I think that both server and client should fit together.
Furthermore, test1 is wrong in both client and server, but could be some kotlin problem.

@Query
fun test1(list: @NonNull List<String>): String

Graphql:

test1(list: [String]): String

Note kotlin is a bit special with annotations https://youtrack.jetbrains.com/issue/KT-35843 we need an extra flag.
The reproducer uses a quarkus snapshot based on this pr #2141
code-with-quarkus-nonnull-kotlin.zip

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

No branches or pull requests

1 participant