-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstudies.graphqls
134 lines (113 loc) · 3.25 KB
/
studies.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
type StudyTopic implements CollectionItem {
id: ID!
title: String!
description: String!
image(style: ImageStyle): String @goField(forceResolver: true)
images: [Image!]!
"""
The default lesson.
Should not be used actively in lists, as it could affect query speeds.
"""
defaultLesson: Lesson! @goField(forceResolver: true)
lessons(first: Int, offset: Int): LessonPagination! @goField(forceResolver: true)
progress: LessonsProgress! @goField(forceResolver: true)
}
type Lesson {
id: ID!
title: String!
description: String!
introScreenCode: String
showDiscoverPage: Boolean!
image(style: ImageStyle): String @goField(forceResolver: true)
tasks(first: Int, offset: Int): TaskPagination! @goField(forceResolver: true)
topic: StudyTopic! @goField(forceResolver: true)
"""
The default episode.
Should not be used actively in lists, as it could affect query speeds.
"""
defaultEpisode: Episode @goField(forceResolver: true)
episodes(first: Int, offset: Int): EpisodePagination! @goField(forceResolver: true)
links(first: Int, offset: Int): LinkPagination! @goField(forceResolver: true)
progress: TasksProgress! @goField(forceResolver: true)
completed: Boolean! @goField(forceResolver: true)
locked: Boolean! @goField(forceResolver: true)
previous: Lesson @goField(forceResolver: true)
next: Lesson @goField(forceResolver: true)
}
type LessonPagination implements Pagination {
offset: Int!
first: Int!
total: Int!
items: [Lesson!]!
}
interface Task {
id: ID!
title: String!
completed: Boolean!
}
type LessonsProgress {
total: Int!
completed: Int!
}
type TasksProgress {
total: Int!
completed: Int!
alternativesTasksTotal: Int!
alternativesTasksCompleted: Int!
alternativesTasksCorrect: Int!
}
type TaskPagination implements Pagination {
offset: Int!
first: Int!
total: Int!
items: [Task!]!
}
type AlternativesTask implements Task {
id: ID!
title: String!
completed: Boolean! @goField(forceResolver: true)
alternatives: [Alternative!]! @goField(forceResolver: true)
competitionMode: Boolean! @deprecated(reason: "Equivalent to !showAnswer && lockAnswer")
showAnswer: Boolean!
lockAnswer: Boolean!
locked: Boolean! @goField(forceResolver: true)
}
type Alternative {
id: ID!
title: String!
isCorrect: Boolean
selected: Boolean!
}
type TextTask implements Task {
id: ID!
title: String!
completed: Boolean! @goField(forceResolver: true)
}
type PosterTask implements Task {
id: ID!
title: String!
completed: Boolean! @goField(forceResolver: true)
image: String!
}
type QuoteTask implements Task {
id: ID!
title: String!
completed: Boolean! @goField(forceResolver: true)
image: String!
}
type VideoTask implements Task {
id: ID!
title: String!
completed: Boolean! @goField(forceResolver: true)
episode: Episode! @goField(forceResolver: true)
secondaryTitle: String
description: String
}
type LinkTask implements Task {
id: ID!
title: String!
completed: Boolean! @goField(forceResolver: true)
link: Link! @goField(forceResolver: true)
secondaryTitle: String
description: String
}