forked from crowetic/commerce
Update Shopify API version (#833)
This commit is contained in:
parent
11609a9e71
commit
8398a96215
@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema": {
|
||||
"https://${NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN}/api/2022-04/graphql.json": {
|
||||
"https://${NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN}/api/2022-07/graphql.json": {
|
||||
"headers": {
|
||||
"X-Shopify-Storefront-Access-Token": "${NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN}"
|
||||
}
|
||||
|
7068
packages/shopify/schema.d.ts
vendored
7068
packages/shopify/schema.d.ts
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,6 @@ export const STORE_DOMAIN = process.env.NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN
|
||||
|
||||
export const SHOPIFY_COOKIE_EXPIRE = 30
|
||||
|
||||
export const API_URL = `https://${STORE_DOMAIN}/api/2021-07/graphql.json`
|
||||
export const API_URL = `https://${STORE_DOMAIN}/api/2022-07/graphql.json`
|
||||
|
||||
export const API_TOKEN = process.env.NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN
|
||||
|
@ -53,7 +53,7 @@ const normalizeProductOption = ({
|
||||
}
|
||||
|
||||
const normalizeProductImages = ({ edges }: ImageConnection) =>
|
||||
edges?.map(({ node: { originalSrc: url, ...rest } }) => ({
|
||||
edges?.map(({ node: { url, ...rest } }) => ({
|
||||
url,
|
||||
...rest,
|
||||
}))
|
||||
@ -161,7 +161,7 @@ function normalizeLineItem({
|
||||
sku: variant?.sku ?? '',
|
||||
name: variant?.title!,
|
||||
image: {
|
||||
url: variant?.image?.originalSrc || '/product-img-placeholder.svg',
|
||||
url: variant?.image?.url || '/product-img-placeholder.svg',
|
||||
},
|
||||
requiresShipping: variant?.requiresShipping ?? false,
|
||||
price: variant?.priceV2?.amount,
|
||||
|
@ -23,7 +23,7 @@ export const productConnectionFragment = /* GraphQL */ `
|
||||
}
|
||||
edges {
|
||||
node {
|
||||
originalSrc
|
||||
url
|
||||
altText
|
||||
width
|
||||
height
|
||||
|
@ -35,7 +35,7 @@ export const checkoutDetailsFragment = /* GraphQL */ `
|
||||
value
|
||||
}
|
||||
image {
|
||||
originalSrc
|
||||
url
|
||||
altText
|
||||
width
|
||||
height
|
||||
|
@ -58,7 +58,7 @@ const getProductQuery = /* GraphQL */ `
|
||||
}
|
||||
edges {
|
||||
node {
|
||||
originalSrc
|
||||
url
|
||||
altText
|
||||
width
|
||||
height
|
||||
|
Loading…
x
Reference in New Issue
Block a user