-
Notifications
You must be signed in to change notification settings - Fork 352
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
Support built-in ID
type serialization in GraphQLServerRequest
#1952
Support built-in ID
type serialization in GraphQLServerRequest
#1952
Conversation
Thank you for the pr, could you adjust the jacoco thresholds ?
|
@samuelAndalon sure, i added a test that covers my change to please check again 🙇 |
hmm,
could you tell me what is wrong? |
👋 re: example build failure -> that was my miss in the version bump. This should fix it -> #1953 |
@dariuszkuc |
updated |
…1952) ### 📝 Description #### Problem after graphql-kotlin 7.1.0, the following `GraphQLRequest` our team uses started to fail. ```kotlin GraphQLRequest( "query(${'$'}id: ID!) { ... }", variables = mapOf("id" to ID("1")) ) ``` this is because `kotlinx.serialization` is recently introduced instead of Jackson, but `ID` serialization is missing, so it is converted to `JsonNull`. since `ID` is built-in scalar type, i think `ID` serialization should be supported. #### Solution add serialization logic to `AnyNullableKSerializer` ### 🔗 Related Issues N/A
…1952) ### 📝 Description #### Problem after graphql-kotlin 7.1.0, the following `GraphQLRequest` our team uses started to fail. ```kotlin GraphQLRequest( "query(${'$'}id: ID!) { ... }", variables = mapOf("id" to ID("1")) ) ``` this is because `kotlinx.serialization` is recently introduced instead of Jackson, but `ID` serialization is missing, so it is converted to `JsonNull`. since `ID` is built-in scalar type, i think `ID` serialization should be supported. #### Solution add serialization logic to `AnyNullableKSerializer` ### 🔗 Related Issues N/A
…1959) Backport of #1952 to v6 Co-authored-by: Tasuku Nakagawa <[email protected]>
…1958) Backport of #1952 to v7 Co-authored-by: Tasuku Nakagawa <[email protected]>
📝 Description
Problem
after graphql-kotlin 7.1.0, the following
GraphQLRequest
our team uses started to fail.this is because
kotlinx.serialization
is recently introduced instead of Jackson, butID
serialization is missing, so it is converted toJsonNull
.since
ID
is built-in scalar type, i thinkID
serialization should be supported.Solution
add serialization logic to
AnyNullableKSerializer
🔗 Related Issues
N/A