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

Update the return types of the Customer Account API query #1537

Merged
merged 6 commits into from
Dec 4, 2023

Conversation

blittle
Copy link
Contributor

@blittle blittle commented Dec 4, 2023

WHY are these changes introduced?

We can't always assume there is a data property on the Customer Account API response. Also, the other properties, errors and extensions important and useful to the developer.

WHAT is this pull request doing?

Return a complete response from the Customer Account API. Also change to 2024-01 as the default API version. Also, to prevent collisions on autocomplete/code gen with SFAPI, update the query comment to be #graphql customer

HOW to test your changes?

Does the example still work?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

…n methods. Also change the Customer Account API to default to 2024-01.
Comment on lines +6 to +8
const {data} = await context.customer.query<{
customer: {firstName: string; lastName: string};
}>(`#graphql
}>(`#graphql:customer
Copy link
Contributor

Choose a reason for hiding this comment

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

👍💯 the previous example got me real confuse if customer is being use because of graphql field name or as a key word for named graphel end point

Co-authored-by: Michelle Chen <michelle.chen@shopify.com>
Copy link
Contributor

@michenly michenly left a comment

Choose a reason for hiding this comment

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

Local 🎩 is failing on the customer api example, but #1542 should fix it

@blittle blittle merged commit c8e8f6f into main Dec 4, 2023
9 checks passed
@blittle blittle deleted the bl-customer-return-types branch December 4, 2023 21:02
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.

2 participants