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

Support built-in ID type serialization in GraphQLServerRequest #1959

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

samuelAndalon
Copy link
Contributor

@samuelAndalon samuelAndalon commented Apr 16, 2024

Backport of #1952 to v6

…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
@dariuszkuc dariuszkuc changed the title Support built-in ID type serialization in GraphQLServerRequest (#1952) Support built-in ID type serialization in GraphQLServerRequest Apr 16, 2024
@dariuszkuc dariuszkuc added type: bug Something isn't working changes: patch Changes require a patch version labels Apr 16, 2024
@samuelAndalon samuelAndalon merged commit 7f8ff39 into 6.x.x Apr 16, 2024
1 check passed
@samuelAndalon samuelAndalon deleted the 6.x.x-kotlinx-serde-id branch April 16, 2024 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: patch Changes require a patch version type: bug Something isn't working
Development

Successfully merging this pull request may close these issues.

None yet

3 participants