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