Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to 2023-04, this PR will be updated.
Releases
@shopify/[email protected]
Minor Changes
Add UNSTABLE support for GraphQL Codegen to automatically generate types for every Storefront API query in the project via
@shopify/hydrogen-codegen
. (#707) by @frandioxHow to use it while unstable:
Write your queries/mutations in
.ts
or.tsx
files and use the#graphql
comment inside the strings. It's important that every query/mutation/fragment in your project has a unique name:If you use string interpolation in your query variables (e.g. for reusing fragments) you will need to specify
as const
after each interpolated template literal. This helps TypeScript infer the types properly instead of getting a genericstring
type:Pass the queries to the Storefront client and do not specify a generic type value:
Pass the flag
--codegen-unstable
when running the development server, or use the newcodegen-unstable
command to run it standalone without a dev-server:As a result, a new
storefrontapi.generated.d.ts
file should be generated at your project root. You don't need to reference this file from anywhere for it to work, but you should commit it every time the types change.Optional: you can tune the codegen configuration by providing a
<root>/codegen.ts
file (or specify a different path with the--codegen-config-path
flag) with the following content:Feel free to add your custom schemas and generation config here or read from different document files. Please, report any issue you find in our repository.
Patch Changes
Add command to list environments from a linked Hydrogen storefront. (#889) by @graygilmore
Update dev command to automatically injected environment variables from a linked Hydrogen storefront (#861) by @graygilmore
Adds the ability to specify an Environment's branch name to interact with Hydrogen storefront environment variables (#883) by @graygilmore
Fixes issue where routes that begin with the url
/events
could not be created because an internal handler had claimed those routes already. The internal handler now listens at/__minioxygen_events
so hopefully that doesn't conflict with anyone now. :) (#915) by @frehnerUpdated dependencies [
112ac42a
,2e1e4590
]:@shopify/[email protected]
Patch Changes
Add support for generated types from the new unstable codegen feature in the CLI. (#707) by @frandiox
Add a
<Pagination__unstable>
component andgetPaginationVariables__unstable
helper to make rendering large lists from the Storefront API easy. This is an initial unstable release and we expect to finalize the API by the 2023-07 release. See the<Pagination>
component documentation. (#755) by @cartogramUpdated dependencies [
2e1e4590
]:@shopify/[email protected]
Patch Changes
New package that provides GraphQL Codegen plugins and configuration to generate types automatically for Storefront queries in Hydrogen. (#707) by @frandiox
While in alpha/beta, this package should not be used standalone without the Hydrogen CLI.
@shopify/[email protected]
Patch Changes
<BuyNowButton/>
would incorrectly redirect to checkout when React re-renders in certain situations. (#827) by @tiwac100[email protected]
Patch Changes
Fix the load more results button on the /search route (#909) by @juanpprieto
Adds pagination support on /search results (#918) by @juanpprieto
Added import/order ESLint rule and @remix-run/eslint plugin to demo-store template eslint configuration. (#895) by @QuintonC
Updated dependencies [
1a9f4025
,112ac42a
,a8d5fefe
,24b82fcf
,3cc6d751
,112ac42a
,ba54a3b6
]: