summaryrefslogtreecommitdiffstats
path: root/frontend/queries/index.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-03-12 14:06:25 -0400
committerWes Bos <wesbos@gmail.com>2018-03-12 14:06:25 -0400
commit46a0ba30ef54a7e36206481a4f5b2bf1f9702fca (patch)
treea95fd534fc27761d8b26d0dffcdb5f300f7a61c7 /frontend/queries/index.js
parentf7bea2d1b7be2b70dceb25c9837f608b538e9cec (diff)
wip
Diffstat (limited to 'frontend/queries/index.js')
-rw-r--r--frontend/queries/index.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/frontend/queries/index.js b/frontend/queries/index.js
index 87f66b9..bee7e78 100644
--- a/frontend/queries/index.js
+++ b/frontend/queries/index.js
@@ -3,8 +3,8 @@ import { itemDetails } from './fragments';
export const CREATE_ITEM_MUTATION = gql`
${itemDetails}
- mutation createItem($description: String!, $title: String!, $price: Int!, $image: String) {
- createItem(description: $description, title: $title, price: $price, image: $image) {
+ mutation createItem($description: String!, $title: String!, $price: Int!, $image: String, $largeImage: String) {
+ createItem(description: $description, title: $title, price: $price, image: $image, largeImage: $largeImage) {
...itemDetails
}
}
@@ -76,10 +76,6 @@ export const ALL_ITEMS_QUERY = gql`
${itemDetails}
query AllItemsQuery($skip: Int = 0, $first: Int = 3) {
itemsConnection(orderBy: createdAt_DESC, first: $first, skip: $skip) {
- pageInfo {
- hasNextPage
- hasPreviousPage
- }
aggregate {
count
}
@@ -165,6 +161,15 @@ export const UPDATE_LINK_MUTATION = gql`
}
`;
+// TODO: Can't this accept an updates object??
+export const UPDATE_USER_MUTATION = gql`
+ mutation UpdateUser($name: String!) {
+ updateUser(name: $name) {
+ name
+ }
+ }
+`;
+
export const CURRENT_USER_QUERY = gql`
${itemDetails}
query userQuery {