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

feat(v7): fastjson2 for serialization of GraphQLResponse and deserialization of GraphQLRequest #2042

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

samuelAndalon
Copy link
Contributor

samuelAndalon and others added 2 commits October 4, 2024 10:31
…ion of GraphQLRequest (#2040)

[the previous integration of
kotlinx-serialization](#1937)
represented a performance improvement when deserializing requests,
however, responses are still being deserialized with jackson, recently
we found that fastjson2 is the [fastest serialization library for the
jvm](https://github.com/fabienrenaud/java-json-benchmark).

this PR adds an opt-in support for fastjson2 which provides an easy
integration with springboot codecs, the serializer relies on the same
jackson annotation, and just had to write a deserializer because of the
polymorphic nature of GraphQLRequest and GraphQLReponse

GraphQLRequest deserialization
<img width="1156" alt="image"
src="https://github.com/user-attachments/assets/8a1e56a2-0d6f-4118-904a-a5d584caac19">

GraphQLResponse serialization
<img width="1161" alt="image"
src="https://github.com/user-attachments/assets/cfa6c843-50de-42e2-8f8e-7722c722b048">

---------

Co-authored-by: Samuel Vazquez <[email protected]>
@samuelAndalon samuelAndalon merged commit 5a478b5 into 7.x.x Oct 4, 2024
7 of 8 checks passed
@samuelAndalon samuelAndalon deleted the feat/7x.x/fastjson branch October 4, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant