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

fix: specifically use serde::Serialize in Scalar derive #909

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

obmarg
Copy link
Owner

@obmarg obmarg commented Apr 10, 2024

Why are we making this change?

It was reported here that rust_decimal::Decimal errored out when derive(cynic::Scalar) was used on it. This turned out to be because that Decimal type defines its own serialize function in addition to implementing Serialize and the Scalar derive was accidentally using that.

What effects does this change have?

Updaates the Scalar derive to specifically use serde::Serialize::serialize

Copy link

netlify bot commented Apr 10, 2024

Deploy Preview for cynic-querygen-web canceled.

Name Link
🔨 Latest commit 88a6c4b
🔍 Latest deploy log https://app.netlify.com/sites/cynic-querygen-web/deploys/6616c4e126e2ab0008d83995

To avoid problems with `Decimal` and any other type that has a built in
`serialize` function.
@obmarg obmarg merged commit b72ce05 into main Apr 10, 2024
6 checks passed
@obmarg obmarg deleted the obmarg/push-muqnpspwpokn branch April 10, 2024 17:06
@cynic-releaser cynic-releaser bot mentioned this pull request Apr 10, 2024
obmarg added a commit that referenced this pull request Apr 12, 2024
## 🤖 New release
* `cynic`: 3.5.1 -> 3.5.2 (✓ API compatible changes)
* `cynic-proc-macros`: 3.5.1 -> 3.5.2
* `cynic-codegen`: 3.5.1 -> 3.5.2 (✓ API compatible changes)
* `cynic-parser`: 0.2.1 -> 0.2.2 (✓ API compatible changes)
* `cynic-cli`: 3.5.1 -> 3.5.2
* `cynic-introspection`: 3.5.1 -> 3.5.2
* `cynic-querygen`: 3.5.1 -> 3.5.2

<details><summary><i><b>Changelog</b></i></summary><p>

## `cynic`
<blockquote>

## [3.5.2](v3.5.1...v3.5.2) -
2024-04-12

### Fixed
- specifically use serde::Serialize in Scalar derive
([#909](#909))
- merge problems in cynic-codegen
([#896](#896))
- better type kind mismatch errors
([#889](#889))

### Other
- unintentional recursion panic
([#890](#890))
- remove last criterion benchmark
([#898](#898))
- Update cynic-codegen to use cynic-parser
([#824](#824))
- concurrency on release task & remove a TODO
([#884](#884))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

---------

Signed-off-by: cynic-releaser[bot] <166170668+cynic-releaser[bot]@users.noreply.github.com>
Co-authored-by: cynic-releaser[bot] <166170668+cynic-releaser[bot]@users.noreply.github.com>
Co-authored-by: Graeme Coupar <graeme@turbofish.tech>
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

Successfully merging this pull request may close these issues.

1 participant