summaryrefslogtreecommitdiffstats
path: root/stepped-solutions/35/backend/src/schema.graphql
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-08-14 15:39:34 -0400
committerWes Bos <wesbos@gmail.com>2018-08-14 15:39:34 -0400
commitee09df7dee16a7b44711159c60c54cc9365be35e (patch)
treef44bfca6d65c0082ca267300c33ff8186a713ec0 /stepped-solutions/35/backend/src/schema.graphql
parenta07aad867cdfc3d5f270be25e571901af500f625 (diff)
stepped
Diffstat (limited to 'stepped-solutions/35/backend/src/schema.graphql')
-rwxr-xr-xstepped-solutions/35/backend/src/schema.graphql31
1 files changed, 31 insertions, 0 deletions
diff --git a/stepped-solutions/35/backend/src/schema.graphql b/stepped-solutions/35/backend/src/schema.graphql
new file mode 100755
index 0000000..323b1dc
--- /dev/null
+++ b/stepped-solutions/35/backend/src/schema.graphql
@@ -0,0 +1,31 @@
+# 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!
+}
+
+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!]!
+}