-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphqls
140 lines (87 loc) · 1.66 KB
/
schema.graphqls
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
type Exercise {
id: String
name: String
class_exercise: String
description: String
measure: String
count: Int
picture: String
published: Boolean
user: User
}
input ExerciseInput {
id: String
name: String
class_exercise: String
description: String
measure: String
count: Int
picture: String
global: Boolean
}
input TrainingLineInput {
exercise: String
count: Int
}
input TrainingInput {
id: String
name: String
training_lines: [TrainingLineInput]
}
type TrainingLine {
id: String
exercise: String
count: Int
}
type Training {
id: String
name: String
training_lines: [TrainingLine]
}
type ExercisesResult {
success: Boolean
errors: [String]
exercises: [Exercise]
position: Int
total_count: Int
}
type TrainingResult {
success: Boolean
errors: [String]
trainings: [Training]
}
type User {
nickname: String
picture: String
}
input UserOrderByInput {
nickname: Sort
}
enum Sort {
asc
desc
}
input UserInput {
nickname: String
order_by: UserOrderByInput
}
type UserResult {
success: Boolean
errors: [String]
users: [User]
}
type QueryFitness {
searchExercises(exercise: ExerciseInput, page: Int, size: Int): ExercisesResult!
searchTrainings(training: TrainingInput): TrainingResult!
searchUsers(user: UserInput): UserResult!
}
type MutationFitness {
createExercise(exercise: ExerciseInput!): ExercisesResult
deleteExercises(exercise: ExerciseInput!): ExercisesResult
createTrainings(training: TrainingInput!): TrainingResult
deleteTrainings(training: TrainingInput!): TrainingResult
}
schema {
query: QueryFitness
mutation: MutationFitness
}