This commit is contained in:
cond0r
2021-02-25 11:16:44 +02:00
parent f242f3c588
commit e6792d6dd0
10 changed files with 19 additions and 28 deletions

View File

@@ -41,7 +41,6 @@ const normalizeProductImages = ({ edges }: ImageConnection) =>
}))
const normalizeProductVariants = ({ edges }: ProductVariantConnection) => {
console.log(edges)
return edges?.map(({ node: { id, selectedOptions } }) => ({
id,
options: selectedOptions.map(({ name, value }: SelectedOption) =>

View File

@@ -1,5 +1,5 @@
export const getAllPagesQuery = /* GraphQL */ `
query($first: Int!) {
query getAllPages($first: Int = 250) {
pages(first: $first) {
edges {
node {

View File

@@ -1,5 +1,5 @@
const getAllProductsPathsQuery = /* GraphQL */ `
query getAllProductPaths($first: Int!, $cursor: String) {
query getAllProductPaths($first: Int = 250, $cursor: String) {
products(first: $first, after: $cursor) {
pageInfo {
hasNextPage

View File

@@ -1,15 +1,12 @@
export const getPageQuery = /* GraphQL */ `
query($first: Int!) {
pages(first: $first) {
edges {
node {
id
title
handle
body
url
}
}
query getPageBySlug($slug: String!) {
pageByHandle(handle: $slug) {
id
title
handle
body
bodySummary
url
}
}
`

View File

@@ -1,5 +1,5 @@
export { default as getSiteCollectionsQuery } from './get-all-collections-query'
export { default as getProductQuery } from './get-all-products-paths-query'
export { default as getProductQuery } from './get-product-query'
export { default as getAllProductsQuery } from './get-all-products-query'
export { default as getAllProductsPathtsQuery } from './get-all-products-paths-query'
export { default as getAllProductVendors } from './get-all-product-vendors-query'