fix(core): Deprecation of lines
, shipping
and adjustment
fields in the RefundOrderInput
input.
#3119
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 withoutlines
etc.After some further investigation, I noticed that deprecating the
lines
,shipping
andadjustment
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
lines
,shipping
andadjustment
fields in theRefundOrderInput
input.Screenshots
You can add screenshots here if applicable.
Checklist
📌 Always:
👍 Most of the time: