vendure icon indicating copy to clipboard operation
vendure copied to clipboard

fix(core): Deprecation of `lines`, `shipping` and `adjustment` fields in the `RefundOrderInput` input.

Open sonntag-philipp opened this issue 4 months ago • 1 comments

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:

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

👍 Most of the time:

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

sonntag-philipp avatar Oct 08 '24 20:10 sonntag-philipp