-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate from graphql-codegen to genql (#43)
* genql is awesome * changeset * genql prerelease * append ts-nocheck on top of generated files * version
- Loading branch information
1 parent
450a930
commit 3a6fb0f
Showing
38 changed files
with
29,283 additions
and
40,210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# nextjs-localstorage | ||
|
||
## 0.1.1 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [7be03f0] | ||
- @bsmnt/storefront-hooks@2.0.2 | ||
|
||
## 0.1.1-next.0 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [7be03f0] | ||
- @bsmnt/storefront-hooks@1.3.1-next.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# nextjs-shopify | ||
|
||
## 0.1.1 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [7be03f0] | ||
- @bsmnt/drop@1.2.1 | ||
- @bsmnt/storefront-hooks@2.0.2 | ||
|
||
## 0.1.1-next.0 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [7be03f0] | ||
- @bsmnt/drop@1.2.1-next.0 | ||
- @bsmnt/storefront-hooks@1.3.1-next.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 2 additions & 6 deletions
8
examples/nextjs-shopify/src/storefront/hooks/use-product-form-helper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
examples/nextjs-shopify/src/storefront/sdk-gen/fragments.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import type { | ||
Collection, | ||
Product, | ||
CollectionGenqlSelection, | ||
FieldsSelection, | ||
ProductGenqlSelection, | ||
ImageGenqlSelection, | ||
ProductVariantGenqlSelection, | ||
ProductVariant, | ||
Image, | ||
} from './generated' | ||
|
||
const imageFragment = { | ||
url: true, | ||
width: true, | ||
height: true, | ||
altText: true, | ||
} satisfies ImageGenqlSelection | ||
|
||
export type ImageFragment = FieldsSelection<Image, typeof imageFragment> | ||
|
||
export const productVariantFragment = { | ||
id: true, | ||
title: true, | ||
availableForSale: true, | ||
quantityAvailable: true, | ||
compareAtPriceV2: { | ||
amount: true, | ||
currencyCode: true, | ||
}, | ||
priceV2: { | ||
amount: true, | ||
currencyCode: true, | ||
}, | ||
image: imageFragment, | ||
selectedOptions: { | ||
name: true, | ||
value: true, | ||
}, | ||
} satisfies ProductVariantGenqlSelection | ||
|
||
export type ProductVariantFragment = FieldsSelection< | ||
ProductVariant, | ||
typeof productVariantFragment | ||
> | ||
|
||
export const productFragment = { | ||
id: true, | ||
title: true, | ||
options: { | ||
__args: { first: 25 }, | ||
id: true, | ||
name: true, | ||
values: true, | ||
}, | ||
availableForSale: true, | ||
variants: { | ||
__args: { first: 100 }, | ||
nodes: productVariantFragment | ||
}, | ||
} satisfies ProductGenqlSelection | ||
|
||
export type ProductFragment = FieldsSelection<Product, typeof productFragment> | ||
|
||
export const collectionFragment = { | ||
id: true, | ||
title: true, | ||
description: true, | ||
products: { | ||
__args: { first: 100 }, | ||
nodes: productFragment, | ||
}, | ||
} satisfies CollectionGenqlSelection | ||
|
||
export type CollectionFragment = FieldsSelection< | ||
Collection, | ||
typeof collectionFragment | ||
> | ||
|
Oops, something went wrong.
3a6fb0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
commerce-toolkit-nextjs-localstorage – ./examples/nextjs-localstorage
commerce-toolkit-nextjs-localstorage-git-main-basement.vercel.app
commerce-toolkit-nextjs-localstorage-basement.vercel.app
commerce-toolkit-nextjs-localstorage.vercel.app
3a6fb0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
commerce-toolkit-nextjs-shopify – ./examples/nextjs-shopify
commerce-toolkit-nextjs-shopify.vercel.app
commerce-toolkit-nextjs-shopify-basement.vercel.app
commerce-toolkit-nextjs-shopify-git-main-basement.vercel.app