summaryrefslogtreecommitdiffstats
path: root/stepped-solutions/30/src/schema.graphql
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-08-10 13:14:27 -0400
committerWes Bos <wesbos@gmail.com>2018-08-10 13:14:27 -0400
commitebb84f1f01396cf75e7fb70bb0e2987bbc0b14b2 (patch)
tree17030a43e9d6a617f8ab269195823096dce071ea /stepped-solutions/30/src/schema.graphql
parent6daab5e176382954d2229d8a9251ae819572a29e (diff)
30
Diffstat (limited to 'stepped-solutions/30/src/schema.graphql')
-rwxr-xr-xstepped-solutions/30/src/schema.graphql30
1 files changed, 30 insertions, 0 deletions
diff --git a/stepped-solutions/30/src/schema.graphql b/stepped-solutions/30/src/schema.graphql
new file mode 100755
index 0000000..d1db1ba
--- /dev/null
+++ b/stepped-solutions/30/src/schema.graphql
@@ -0,0 +1,30 @@
+# 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
+}
+
+type User{
+ id: ID!
+ name: String!
+ email: String!
+ permissions: [Permission!]!
+}