summaryrefslogtreecommitdiffstats
path: root/frontend/queries/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/queries/index.js')
-rw-r--r--frontend/queries/index.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/frontend/queries/index.js b/frontend/queries/index.js
index 6b3dd2a..1080a2e 100644
--- a/frontend/queries/index.js
+++ b/frontend/queries/index.js
@@ -74,28 +74,18 @@ export const CREATE_ORDER_MUTATION = gql`
export const ALL_ITEMS_QUERY = gql`
# Import the Fragment
${itemDetails}
- query AllItemsQuery($skip: Int = 0, $first: Int = 2) {
- itemsConnection {
+ query AllItemsQuery($skip: Int = 0, $first: Int = 3) {
+ itemsConnection(orderBy: createdAt_DESC, first: $first, skip: $skip) @connection(key: "itemsConnection") {
aggregate {
count
}
}
- items(orderBy: createdAt_DESC, first: $first, skip: $skip) {
+ items(orderBy: createdAt_DESC, first: $first, skip: $skip) @connection(key: "items") {
...itemDetails
}
}
`;
-export const ITEM_COUNT_QUERY = gql`
- query itemCountQuery {
- itemsConnection {
- aggregate {
- count
- }
- }
- }
-`;
-
export const SINGLE_ITEM_QUERY = gql`
${itemDetails}
query FindItem($id: ID!) {