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] Changes Money.amount type to string following GraphQL schema Decimal type #1854

Closed
wants to merge 5 commits into from

Conversation

sle-c
Copy link
Contributor

@sle-c sle-c commented Dec 10, 2024

WHY are these changes introduced?

Money.amount type from GraphQL actually returns a string as a result of Decimal serialization in the Admin GraphQL schema.

See

WHAT is this pull request doing?

Changes amount type from number to string

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used pnpm changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@sle-c sle-c marked this pull request as ready for review December 10, 2024 18:30
@sle-c sle-c requested a review from a team as a code owner December 10, 2024 18:30
@sle-c
Copy link
Contributor Author

sle-c commented Dec 11, 2024

Discussed with @lizkenyon and we think that this is too big of a breaking change. Liz suggested we use a less breaking approach to cast the response from the graphql response to the number type. We agreed on it and I'll modify this PR to do so

@sle-c
Copy link
Contributor Author

sle-c commented Dec 11, 2024

Follow up with #1863

Copy link
Contributor

@matteodepalo matteodepalo left a comment

Choose a reason for hiding this comment

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

LGTM

@sle-c
Copy link
Contributor Author

sle-c commented Dec 17, 2024

hey @matteodepalo , this is too much of a breaking change so I'll close this in favor of #1863

@sle-c sle-c closed this Dec 17, 2024
@sle-c sle-c deleted the sle-c/fix-money-amount-type branch December 17, 2024 15:01
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.

2 participants