diff options
Diffstat (limited to 'finished-application/backend/src/schema.graphql')
| -rw-r--r-- | finished-application/backend/src/schema.graphql | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/finished-application/backend/src/schema.graphql b/finished-application/backend/src/schema.graphql index 07533eb..8a8eeeb 100644 --- a/finished-application/backend/src/schema.graphql +++ b/finished-application/backend/src/schema.graphql @@ -1,39 +1,39 @@ -# The Below line looks like a comment, but it's not! # import * from './generated/prisma.graphql' -type Query { - me: User - order(id: ID!): Order! - orders(where: OrderWhereInput, orderBy: OrderOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Order]! - items(where: ItemWhereInput, orderBy: ItemOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Item]! - itemsConnection(where: ItemWhereInput, orderBy: ItemOrderByInput, first: Int, last: Int, skip: Int): ItemConnection! +type SuccessMessage { + message: String } type Mutation { + createItem(title: String, description: String, price: Int, image: String, largeImage: String): Item! + updateItem(id: ID!, title: String, description: String, price: Int): Item! + deleteItem(id: ID!): Item signup(email: String!, password: String!, name: String!): User! signin(email: String!, password: String!): User! - requestReset(email: String!): User + signout: SuccessMessage + requestReset(email: String!): SuccessMessage resetPassword(resetToken: String!, password: String!, confirmPassword: String!): User! - createItem(title: String, description: String, price: Int, image: String, largeImage: String): Item! - deleteItem(id: ID!): Item! - updateItem(id: ID!, title: String, description: String, price: Int): Item! + updatePermissions(permissions: [Permission], userId: ID!): User addToCart(id: ID!): CartItem removeFromCart(id: ID!): CartItem createOrder(token: String!): Order! - updateUser(name: String): User - signout: SuccessMessage - updatePermissions(permissions: [Permission], userId: ID!): User } -type SuccessMessage { - message: String +type Query { + items(where: ItemWhereInput, orderBy: ItemOrderByInput, skip: Int, first: Int): [Item]! + item(where: ItemWhereUniqueInput!): Item + itemsConnection(where: ItemWhereInput): ItemConnection! + me: User + users: [User]! + order(id: ID!): Order + orders(orderBy: OrderOrderByInput): [Order]! } -type User { +type User{ id: ID! - email: String! name: String! - orders: [Order!]! + email: String! + permissions: [Permission!]! cart: [CartItem!]! - permissions: [Permission]! + orders: [OrderItem] } |
