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

Use new GraphQL clients in shopify-api #1068

Merged
merged 5 commits into from
Dec 12, 2023
Merged

Use new GraphQL clients in shopify-api #1068

merged 5 commits into from
Dec 12, 2023

Conversation

paulomarg
Copy link
Contributor

@paulomarg paulomarg commented Nov 29, 2023

WHY are these changes introduced?

Now that @shopify/storefront-api-client and @shopify/admin-api-client are released, we want to start using them in this package.

WHAT is this pull request doing?

Underpinning the existing clients with the new ones. As part of this change, I also did a bit of refactoring on the tests and rearranged the files inside lib/clients to match the exported object more closely.

Since this is already a big change (mostly due to tests moving around), I'm setting up an update of the REST client in a different PR.

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:22
@paulomarg paulomarg changed the title Use new GraphQL clients in shopify-api [WIP] Use new GraphQL clients in shopify-api Nov 29, 2023
@paulomarg paulomarg force-pushed the refactor_adapter_fetch branch from 185633e to f2135c8 Compare November 29, 2023 17:24
@paulomarg paulomarg force-pushed the use_new_clients branch 2 times, most recently from 78c39d0 to eb5d000 Compare November 29, 2023 20:40
@paulomarg paulomarg changed the title [WIP] Use new GraphQL clients in shopify-api Use new GraphQL clients in shopify-api Nov 29, 2023
@paulomarg paulomarg changed the title Use new GraphQL clients in shopify-api [WIP] Use new GraphQL clients in shopify-api Nov 29, 2023
@paulomarg paulomarg changed the title [WIP] Use new GraphQL clients in shopify-api Use new GraphQL clients in shopify-api Nov 29, 2023
@paulomarg paulomarg force-pushed the refactor_adapter_fetch branch from f2135c8 to 0311d59 Compare December 1, 2023 13:50
@paulomarg paulomarg force-pushed the use_new_clients branch 3 times, most recently from c474907 to 77f10ca Compare December 1, 2023 17:43
Copy link
Contributor

@byrichardpowell byrichardpowell left a comment

Choose a reason for hiding this comment

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

Approving so you can ship without a second review,

But: Could you run me through the changes on tuple? There is a lot going on here and I don't trust I understand everything.

"@shopify/graphql-client": patch
---

Use the new GraphQL API clients in shopify-api to use all of the latest features, including automatic types for query / mutation return object and variables.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question here as in another PR:

  1. Can we show what this means? Perhaps a GIF?
  2. Can we link to a PR that shows the changes needed to make use of the new awesomeness?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the best thing here would be to add a documentation page that goes over that step by step. That page can include a video / gif of the experience, plus instructions on setting it up. Maybe we can make that a follow up and ensure we link there from the changelog / migration guide?

packages/admin-api-client/src/index.ts Show resolved Hide resolved
packages/shopify-api/docs/migrating-to-v9.md Show resolved Hide resolved
packages/shopify-api/lib/index.ts Show resolved Hide resolved
Base automatically changed from refactor_adapter_fetch to main December 8, 2023 19:24
@paulomarg paulomarg force-pushed the use_new_clients branch 2 times, most recently from dc6d659 to 1328b11 Compare December 8, 2023 19:40
Copy link
Contributor

@byrichardpowell byrichardpowell left a comment

Choose a reason for hiding this comment

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

3 small comments, but approving so you don't need another review.

Great work.

@paulomarg paulomarg merged commit ff5e522 into main Dec 12, 2023
10 checks passed
@paulomarg paulomarg deleted the use_new_clients branch December 12, 2023 14:22
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.

5 participants