-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathschema.graphql
118 lines (104 loc) · 2.25 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type Article {
_id: String!
author: User!
authorId: String!
body: String!
comments: [Comment!]!
createdAt: String!
deletedAt: String
description: String!
favoritesCount: Int!
slug: String!
tagList: [String]!
title: String!
updatedAt: String!
}
input ArticleCreateInput {
body: String!
description: String!
tagList: [String!]
title: String!
}
input ArticleUpdateInput {
body: String
description: String
slug: String!
tagList: [String!]
title: String
}
type Comment {
_id: String!
author: User!
authorId: String!
body: String!
createdAt: String!
deletedAt: String
}
input CommentCreateInput {
body: String!
slug: String!
}
input CommentDeleteInput {
id: String!
slug: String!
}
input LoginInput {
password: String!
username: String!
}
type Mutation {
addFavorite(slug: String!): Article!
addFollow(username: String!): Profile!
createArticle(createArticleData: ArticleCreateInput!): Article!
createComment(createCommentData: CommentCreateInput!): Comment!
createUser(createUserData: UserCreateInput!): User!
deleteArticle(slug: String!): Article!
deleteComment(deleteCommentData: CommentDeleteInput!): Comment!
login(loginData: LoginInput!): Token!
removeFavorite(slug: String!): Article!
removeFollow(username: String!): Profile!
updateArticle(updateArticleData: ArticleUpdateInput!): Article!
updateUser(updateUserData: UserUpdateInput!): User!
}
type Profile {
_id: String!
bio: String
following: Boolean!
image: String
username: String!
}
type Query {
articles(slug: String): [Article]!
me: User!
profile(username: String!): Profile!
user(email: String, id: String, username: String): User!
}
type Token {
access_token: String!
}
type User {
_id: String!
articles: [Article!]!
bio: String
email: String!
feed: [Article!]!
image: String
password: String!
updatedAt: String!
username: String!
}
input UserCreateInput {
email: String!
password: String!
username: String!
}
input UserUpdateInput {
bio: String
email: String!
image: String
password: String
username: String!
}