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

Support storefront api for customer account api #1465

Conversation

brianshen1990
Copy link
Contributor

@brianshen1990 brianshen1990 commented Oct 24, 2023

Background

Part of Shopify/core-issues#61073

Please also have a review of customer account web side PR https://github.com/Shopify/customer-account-web/pull/3246

Support storefront api for standard customer account ui extension api

Solution

(Describe your solution, why this approach was chosen, and what the alternatives/impacts may be)

🎩

Please see the tophat here https://github.com/Shopify/customer-account-web/pull/3246

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

@brianshen1990 brianshen1990 force-pushed the Support-storefront-api-access-for-customer-account-standard-api branch 2 times, most recently from 0ec09fc to 520d61a Compare October 24, 2023 18:24
@brianshen1990 brianshen1990 self-assigned this Oct 24, 2023
@brianshen1990 brianshen1990 marked this pull request as ready for review October 24, 2023 18:36
@github-actions
Copy link
Contributor

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset directory. If the changes are user-facing and should cause a version bump, run yarn changeset to track your changes and include them in the next release CHANGELOG. If you are making simple updates to repo configuration, examples, or documentation, you do not need to add a changeset.

*/
query: <Data = unknown, Variables = {[key: string]: unknown}>(
query: string,
options?: {variables?: Variables; version?: StorefrontApiVersion},
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we decided on not supporting query for customers API with an optional parameter ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are only going to support storefront api for now, for query on customer API, we need to figure out how to do that for soft auth ( which customer should the query represents, how to add soft auth authentication header ), and whether to update existing query api ( currently we have to match order status api ), if we want to, maybe another parameter, or another function

Copy link
Contributor

@alxclark alxclark left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏼 Should we make the OrderStatus targets extend the standard api interface on unstable ? It would avoid having to duplicate the query typings here (although it will be a much bigger lift)

@brianshen1990
Copy link
Contributor Author

Looks good 👍🏼 Should we make the OrderStatus targets extend the standard api interface on unstable ? It would avoid having to duplicate the query typings here (although it will be a much bigger lift)

I have to keep query in OrderStatusApi for now, and we are not going to extend standardApi in orderstatus api, instead , we will have all order status related targets have both orderStatusApi and standardApi, and then remove duplicated one ( not not intended to override ones ), I will have a PR open soon

@brianshen1990 brianshen1990 force-pushed the Support-storefront-api-access-for-customer-account-standard-api branch from 520d61a to c3aaf8a Compare October 27, 2023 14:14
Copy link
Contributor

@lihaokx lihaokx left a comment

Choose a reason for hiding this comment

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

🎩 LGTM

@brianshen1990 brianshen1990 merged commit 03d69b5 into unstable Oct 27, 2023
5 checks passed
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.

3 participants