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

✨ add schema generation for customer account api in hydrogen-react ‰… #1572

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

michenly
Copy link
Contributor

@michenly michenly commented Dec 13, 2023

…and export these types in both hydrogen-react & hydrogen.

Related PR: #1569

WHY are these changes introduced?

This is needed to fetch and use customer account api schema types.

WHAT is this pull request doing?

graphql-types command in hydrogen-react now generate two additional files customer.schema.json & src/customer-account-api-types.d.ts which is the schema & the schema types from Customer Account API.

Both of those files are being exported in hydrogen-react & hydrogen package.

HOW to test your changes?

There is nothing to test just yet

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

@michenly michenly requested a review from frandiox December 13, 2023 19:06
@michenly michenly force-pushed the mc-add-customer-account-api-schema branch 2 times, most recently from 7abe11b to c42c793 Compare December 13, 2023 19:16
@michenly michenly marked this pull request as ready for review December 13, 2023 19:18
Comment on lines +7 to +8
const SF_API_VERSION = '2023-10';
const CA_API_VERSION = '2024-01';
Copy link
Contributor

Choose a reason for hiding this comment

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

😬 should we release this in 2024.1.0 to honor the CAAPI version?
Or at least mention explicitly that this is still unstable/release candidate, and that the stable will come in 2024.1.0?

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 would like to do the update for SFAPI version on a separate PR because there are so much involved (updating hydrogen version and all the doc links) and this PR has enough file changes as it is. I will update the changelog with the unstable information thou!

Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

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

Great! When I generate types in hydrogen-react in this branch, I get updates in customer.schema.json and customer-account-api-types.d.ts:

image

Can you run it again and make sure we have the latest and greatest?

…d export these types in both hydrogen-react & hydrogen.
@michenly michenly force-pushed the mc-add-customer-account-api-schema branch from 247db5c to 29252f1 Compare December 14, 2023 20:45
@michenly michenly merged commit d6d0132 into main Dec 14, 2023
9 checks passed
@michenly michenly deleted the mc-add-customer-account-api-schema branch December 14, 2023 20:49
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