mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 21:51:21 +00:00
added missing vendure search input values
This commit is contained in:
parent
a98c95d447
commit
dabc3073fe
@ -127,4 +127,3 @@ a {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
.fit {
|
||||
min-height: calc(100vh - 88px);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,14 @@ import { GetAllProductsQuery } from '../schema'
|
||||
import { normalizeSearchResult } from '../lib/normalize'
|
||||
import { getAllProductsQuery } from '../lib/queries/get-all-products-query'
|
||||
|
||||
export type ProductVariables = { first?: number }
|
||||
export type ProductVariables = {
|
||||
first?: number
|
||||
skip?: number
|
||||
facetValueIds?: number[] | number
|
||||
collectionSlug?: string
|
||||
searchTerm?: string
|
||||
groupByProduct?: boolean
|
||||
}
|
||||
|
||||
async function getAllProducts(opts?: {
|
||||
variables?: ProductVariables
|
||||
@ -26,7 +33,11 @@ async function getAllProducts({
|
||||
const variables = {
|
||||
input: {
|
||||
take: vars.first,
|
||||
groupByProduct: true,
|
||||
skip: vars.skip,
|
||||
term: vars.searchTerm,
|
||||
facetValueIds: vars.facetValueIds,
|
||||
collectionSlug: vars.collectionSlug,
|
||||
groupByProduct: vars.groupByProduct ? true : false,
|
||||
},
|
||||
}
|
||||
const { data } = await config.fetch<GetAllProductsQuery>(query, { variables })
|
||||
|
Loading…
x
Reference in New Issue
Block a user