-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.gql
117 lines (88 loc) · 2.35 KB
/
schema.gql
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
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type Author {
"""Unique uuid of author"""
id: String!
"""Firstname of the author"""
name: String!
"""Lastname of the author"""
surname: String!
"""E-Mail address of the author"""
mail: String!
"""All the posts made by author"""
posts: [Contents!]!
"""All the comments made by author"""
comments: [Contents!]!
"""All the reactions given by author"""
reactions: [Reaction!]!
}
type Contents {
"""Unique uuid of content"""
id: String!
"""Type of the content, post or comment"""
type: String!
author: Author!
"""If it's a comment, define post here"""
relation: Contents
"""Title of the content"""
title: String!
"""Full context of the content"""
context: String!
"""All the comments made for post"""
comments: [Contents!]!
"""All the reactions made by author"""
reaction: [Reaction!]!
}
type Reaction {
"""Unique uuid of reaction"""
id: String!
content: Contents!
author: Author!
"""Reaction for the content"""
reaction: String!
}
type Query {
authors: [Author!]!
author(id: String!): Author!
contents(type: String): [Contents!]!
content(id: String!): Contents!
reactions: [Reaction!]!
reaction(id: String!): Reaction!
}
type Mutation {
createAuthor(createAuthorInput: CreateAuthorInput!): Author!
removeAuthor(id: String!): Author!
createContent(createContentInput: CreateContentInput!): Contents!
removeContent(id: String!): Contents!
createReaction(createReactionInput: CreateReactionInput!): Reaction!
removeReaction(id: String!): Reaction!
}
input CreateAuthorInput {
"""Firstname of the author"""
name: String!
"""Lastname of the author"""
surname: String!
"""E-Mail address of the author, should be unique"""
mail: String!
}
input CreateContentInput {
"""Type of the content, post or comment"""
type: String!
"""Author of the content"""
author: String!
"""Title of the content"""
title: String!
"""Full context of the content"""
relation: String
"""Full context of the content"""
context: String!
}
input CreateReactionInput {
"""Content of the reaction"""
content: String!
"""Author of the reaction"""
author: String!
"""Reaction for the content"""
reaction: String!
}