Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Revamp REST client to match new clients #1069

Closed
wants to merge 5 commits into from

Conversation

paulomarg
Copy link
Contributor

WHY are these changes introduced?

The new GraphQL clients work slightly differently than the previous ones in shopify-api, in that the parameters they accept are slightly different.

Once we start using them, the REST client would be inconsistent and might lead to confusion.

WHAT is this pull request doing?

Revamping the REST client to:

  • have a creator that's a function and not a class
  • expose an API like client.get(path, { /* options */ }) so that it is more similar to the new clients

Type of change

  • Minor: New feature (non-breaking change which adds functionality)

Checklist

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

@paulomarg paulomarg requested a review from a team as a code owner November 29, 2023 16:41
@paulomarg paulomarg force-pushed the revamp_rest_client branch 2 times, most recently from f24a1f7 to ea9bb3e Compare November 29, 2023 20:37
@paulomarg paulomarg changed the title [WIP] Revamp REST client to match new clients Revamp REST client to match new clients Nov 29, 2023
@paulomarg paulomarg force-pushed the use_new_clients branch 3 times, most recently from c474907 to 77f10ca Compare December 1, 2023 17:43
@paulomarg
Copy link
Contributor Author

This PR no longer applies, we've decided to go a different way and not refactor the REST client since the GraphQL ones won't change quite as much.

@paulomarg paulomarg closed this Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant