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(mutate): serialize clientless patches correctly #186

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Apr 3, 2023

This PR fixes an issue where passing a clientless patch (new Patch('doc-id')) will result in the mutation getting incorrectly serialized when passed to mutate().

Actually serialized body:

{mutations: [{id: 'doc-id', set: {foo: 'bar'}]}

Expected body:

{mutations: [{patch: {id: 'doc-id', set: {foo: 'bar'}]}}

@rexxars rexxars requested a review from stipsan April 3, 2023 15:26
Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!!

@rexxars rexxars merged commit b635dff into main Apr 3, 2023
@rexxars rexxars deleted the fix/serialize-patches branch April 3, 2023 16:28
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2023

🎉 This PR is included in version 5.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants