commerce/lib/saleor/queries/SearchProducts.graphql
Michal Miszczyszyn a8e49ee3f4
Saleor
2023-05-02 00:32:20 +02:00

62 lines
1.1 KiB
GraphQL

query SearchProducts(
$search: String!
$sortBy: ProductOrderField!
$sortDirection: OrderDirection!
) {
products(
first: 100
channel: "default-channel"
sortBy: { field: $sortBy, direction: $sortDirection }
filter: { search: $search }
) {
edges {
node {
id
slug
name
isAvailableForPurchase
description
seoTitle
seoDescription
pricing {
priceRange {
start {
gross {
currency
amount
}
}
stop {
gross {
currency
amount
}
}
}
}
media {
url(size: 2160)
type
alt
}
collections {
name
}
updatedAt
variants {
id
name
pricing {
price {
gross {
currency
amount
}
}
}
}
}
}
}
}