From cabc86b83951b9fefb7e864fba82f1d93715c805 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 13 Apr 2018 10:14:04 -0400 Subject: variables --- frontend/queries/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'frontend/queries') diff --git a/frontend/queries/index.js b/frontend/queries/index.js index 26eae35..f4442b1 100644 --- a/frontend/queries/index.js +++ b/frontend/queries/index.js @@ -1,5 +1,6 @@ import gql from 'graphql-tag'; import { itemDetails } from './fragments'; +import { perPage } from '../config'; export const CREATE_ITEM_MUTATION = gql` ${itemDetails} @@ -74,7 +75,7 @@ export const CREATE_ORDER_MUTATION = gql` export const ALL_ITEMS_QUERY = gql` # Import the Fragment ${itemDetails} - query AllItemsQuery($skip: Int = 0, $first: Int = 2) { + query AllItemsQuery($skip: Int = 0, $first: Int = ${perPage}) { itemsConnection(orderBy: createdAt_DESC, first: $first, skip: $skip) @connection(key: "itemsConnection") { aggregate { count -- cgit v1.3