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

Hydrogen-ui storefront API schema and types #1122

Merged
merged 21 commits into from
Apr 25, 2022
Merged

Conversation

frehner
Copy link
Contributor

@frehner frehner commented Apr 22, 2022

Closes #1025 (and checks off an item on my list) and adds very basic intro docs on how to implement these features.

Relies on #1115 to be merged first, since it builds on that PR. (Opened this PR against that PR so that this one doesn't look as big, I'll change the target after 1115 is merged)

One thing I'm still thinking about is the best way to make the storefront TS types accessible to hydrogen; currently, I think our choices are

  1. Duplicate the TS types and graphql generation code (not a fan)
  2. Force hydrogen to depend on hydrogen-ui and use the types just like any other library/store

Other ideas?

@github-actions
Copy link
Contributor

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

@frehner frehner requested a review from a team April 22, 2022 19:57
- [Add autocompletion for the Storefront API](#storefront-api-graphql-autocompletion)
- [Add Typescript types for Storefront API objects](#typescript-types)

## Storefront API GraphQL autocompletion
Copy link
Contributor Author

@frehner frehner Apr 22, 2022

Choose a reason for hiding this comment

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

@cartogram What we talked about this morning

Base automatically changed from hydrogen-ui-tests to v1.x-2022-07 April 25, 2022 15:38
Copy link
Contributor

@blittle blittle left a comment

Choose a reason for hiding this comment

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

LGTM, I'd like to ship an unstable version of this after merge and test it out.

@frehner frehner merged commit fbdac54 into v1.x-2022-07 Apr 25, 2022
@frehner frehner deleted the hui-sfapi-types branch April 25, 2022 16:17
@frehner
Copy link
Contributor Author

frehner commented Apr 25, 2022

LGTM, I'd like to ship an unstable version of this after merge and test it out.

Hydrogen-ui isn't publishing yet, but that's on my todo list this week.

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.

Improve Storefront API GraphQL and Typescript experience
2 participants