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(core): Deprecation of lines, shipping and adjustment fields in the RefundOrderInput input. #3119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sonntag-philipp
Copy link
Contributor

@sonntag-philipp sonntag-philipp commented Oct 8, 2024

Description

During the refund implementation in my PayPal integration, I noticed that the RefundOrderInput can be a little bit confusing for new developers. At first I did not understand how I am able to use the amount instead of the lines, adjustment and shipping properties.

There was no documentation for this specific input, so I reached out to the discord. In my help thread we came to false conclusions, as we thought it is not possible to just use the amount field by itself without lines etc.

After some further investigation, I noticed that deprecating the lines, shipping and adjustment fields in the GraphQL schema have no effects on the e2e tests. On this base, I removed those 3 fields and created this PR to make the input less confusing.

I understand that my changes can be a little bit controversial, especially as now no value is required in this input. Sadly I am not experienced enough with GraphQL to say if this is okay if checks still ensure at least one option is set. I understand that the fields may better be changed back.

Breaking changes

  • Deprecation of lines, shipping and adjustment fields in the RefundOrderInput input.
  • Making the same fields optional and not required anymore.

Screenshots

You can add screenshots here if applicable.

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

+ Added documentation to the new refund amount value
Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Oct 8, 2024 8:54pm

@@ -410,28 +408,28 @@ type ManualPaymentStateError implements ErrorResult {

union TransitionOrderToStateResult = Order | OrderStateTransitionError
union SettlePaymentResult =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Automatic formatting. Will revert this if necessary.

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