2022-02-21 13:32:38 +00:00
|
|
|
import { gql } from "@apollo/client";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
|
|
|
export const collectionList = gql`
|
|
|
|
query CollectionList(
|
|
|
|
$first: Int
|
|
|
|
$after: String
|
|
|
|
$last: Int
|
|
|
|
$before: String
|
2019-09-11 14:00:02 +00:00
|
|
|
$filter: CollectionFilterInput
|
2019-12-17 17:13:56 +00:00
|
|
|
$sort: CollectionSortingInput
|
2021-08-03 10:06:32 +00:00
|
|
|
$channel: String
|
2019-06-19 14:40:52 +00:00
|
|
|
) {
|
2019-09-11 14:00:02 +00:00
|
|
|
collections(
|
|
|
|
first: $first
|
|
|
|
after: $after
|
|
|
|
before: $before
|
|
|
|
last: $last
|
|
|
|
filter: $filter
|
2019-12-17 17:13:56 +00:00
|
|
|
sortBy: $sort
|
2021-08-03 10:06:32 +00:00
|
|
|
channel: $channel
|
2019-09-11 14:00:02 +00:00
|
|
|
) {
|
2019-06-19 14:40:52 +00:00
|
|
|
edges {
|
|
|
|
node {
|
2022-03-09 08:56:55 +00:00
|
|
|
...Collection
|
2019-06-19 14:40:52 +00:00
|
|
|
products {
|
|
|
|
totalCount
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pageInfo {
|
|
|
|
endCursor
|
|
|
|
hasNextPage
|
|
|
|
hasPreviousPage
|
|
|
|
startCursor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const collectionDetails = gql`
|
|
|
|
query CollectionDetails(
|
|
|
|
$id: ID!
|
|
|
|
$first: Int
|
|
|
|
$after: String
|
|
|
|
$last: Int
|
|
|
|
$before: String
|
|
|
|
) {
|
|
|
|
collection(id: $id) {
|
2022-03-09 08:56:55 +00:00
|
|
|
...CollectionDetails
|
2019-06-19 14:40:52 +00:00
|
|
|
products(first: $first, after: $after, before: $before, last: $last) {
|
|
|
|
edges {
|
|
|
|
node {
|
2022-03-09 08:56:55 +00:00
|
|
|
...CollectionProduct
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
pageInfo {
|
|
|
|
endCursor
|
|
|
|
hasNextPage
|
|
|
|
hasPreviousPage
|
|
|
|
startCursor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|