diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-08-17 15:51:02 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-08-17 15:51:02 -0400 |
| commit | c3bbebfcfeed7a9b8c7470d7b48e12046d834e59 (patch) | |
| tree | 05c50c931d0e709c640744387fbabe870658e9e7 /stepped-solutions/41/backend/src/schema.graphql | |
| parent | 124f227a8235e08bddf8376e0b3d01d33c4414f3 (diff) | |
suuuup everyone
Diffstat (limited to 'stepped-solutions/41/backend/src/schema.graphql')
| -rwxr-xr-x | stepped-solutions/41/backend/src/schema.graphql | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/stepped-solutions/41/backend/src/schema.graphql b/stepped-solutions/41/backend/src/schema.graphql new file mode 100755 index 0000000..864396c --- /dev/null +++ b/stepped-solutions/41/backend/src/schema.graphql @@ -0,0 +1,34 @@ +# import * from './generated/prisma.graphql' + +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! + signout: SuccessMessage + requestReset(email: String!): SuccessMessage + resetPassword(resetToken: String!, password: String!, confirmPassword: String!): User! + updatePermissions(permissions: [Permission], userId: ID!): User + addToCart(id: ID!): CartItem +} + +type Query { + items(where: ItemWhereInput, orderBy: ItemOrderByInput, skip: Int, first: Int): [Item]! + item(where: ItemWhereUniqueInput!): Item + itemsConnection(where: ItemWhereInput): ItemConnection! + me: User + users: [User]! +} + +type User{ + id: ID! + name: String! + email: String! + permissions: [Permission!]! + cart: [CartItem!]! +} |
