feat: add product to cart

:%s
This commit is contained in:
DatNguyen
2021-10-14 14:17:23 +07:00
parent df679163c5
commit 833c5205b2
12 changed files with 215 additions and 19 deletions

View File

@@ -54,7 +54,8 @@ export default function getProductOperation({
values: og.options.map((o) => ({ label: o.name })),
})),
facetValueIds: product.facetValues.map(item=> item.id),
collectionIds: product.collections.map(item => item.id)
collectionIds: product.collections.map(item => item.id),
collection:product.collections.map(item => item.name),
} as Product
}

View File

@@ -3347,7 +3347,7 @@ export type GetProductQuery = { __typename?: 'Query' } & {
collections: Array<
{ __typename?: 'Collection' } & Pick<
Collection,
'id'
'id'|"name"
>
>
}

View File

@@ -41,6 +41,7 @@ export const getProductQuery = /* GraphQL */ `
}
collections {
id
name
}
}
}