Skip to content

Conversation

samuelAndalon
Copy link
Contributor

@samuelAndalon samuelAndalon commented Apr 16, 2024

Backport of #1952 to v7

…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 27d7be0 into 7.x.x Apr 16, 2024
@samuelAndalon samuelAndalon deleted the 7.x.x-kotlinx-serde-id branch April 16, 2024 04:23
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.

3 participants