From e0d0baa75ec0bf617f91b6cd779305d4009cae12 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 9 Feb 2018 13:31:39 -0500 Subject: 🆒 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/schema.graphql | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'backend/src/schema.graphql') diff --git a/backend/src/schema.graphql b/backend/src/schema.graphql index 8a2fa23..b30b096 100644 --- a/backend/src/schema.graphql +++ b/backend/src/schema.graphql @@ -1,4 +1,4 @@ -# import ItemWhereInput, ItemOrderByInput, allItems, Post, Item, ItemCreateInput, ItemOrderByInput, ItemWhereInput from './generated/prisma.graphql' +# import CartItem, ItemWhereInput, ItemOrderByInput, allItems, Post, Item, ItemCreateInput, ItemOrderByInput, ItemWhereInput from './generated/prisma.graphql' type Query { feed: [Post!]! @@ -28,6 +28,7 @@ type Mutation { signup(email: String!, password: String!, name: String!): AuthPayload! signin(email: String!, password: String!): AuthPayload! requestReset(email: String!): User + resetPassword(resetToken: String!, password: String!, confirmPassword: String!): AuthPayload! createDraft(title: String!, text: String!): Post! publish(id: ID!): Post! deletePost(id: ID!): Post! @@ -35,6 +36,8 @@ type Mutation { createItem(title: String, description: String, price: Int): Item! deleteItem(id: ID!): Item! updateItem(id: ID!, title: String, description: String, price: Int): Item! + addToCart(id: ID!): CartItem + removeFromCart(id: ID!): CartItem } type AuthPayload { @@ -49,5 +52,5 @@ type User { name: String! posts: [Post!]! age: Int - resetToken: String + cart: [CartItem!]! } -- cgit v1.3