generated from notiz-dev/nestjs-prisma-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
65 lines (56 loc) · 1.1 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
type Auth {
"""JWT Beare token"""
token: String!
user: User!
}
"""Date custom scalar type"""
scalar Date
input LoginInput {
email: String!
password: String!
}
type Mutation {
signup(data: SignupInput!): Auth!
login(data: LoginInput!): Auth!
}
type Post {
id: String!
createdAt: Date!
updatedAt: Date!
title: String!
published: Boolean!
author: User!
}
type Query {
me: User!
publishedPosts(skip: Int, after: String, before: String, first: Int, last: Int): [Post!]!
userPosts(userId: String!): [Post!]!
post(postId: String!): Post!
helloWorld: String!
hello(name: String!): String!
}
"""User role"""
enum Role {
ADMIN
USER
}
input SignupInput {
email: String!
password: String!
firstname: String
lastname: String
}
type User {
id: String!
registeredAt: Date!
updatedAt: Date!
email: String!
firstname: String
lastname: String
role: Role!
posts: [Post!]!
}