• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CaptainFact / captain-fact-frontend / 20020625706

08 Dec 2025 07:49AM UTC coverage: 2.865% (-2.5%) from 5.41%
20020625706

push

github

Betree
refact: Move everythin to GraphQL, remove redux

38 of 2352 branches covered (1.62%)

Branch coverage included in aggregate %.

0 of 922 new or added lines in 45 files covered. (0.0%)

32 existing lines in 8 files now uncovered.

125 of 3338 relevant lines covered (3.74%)

0.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/API/graphql_queries.js
1
import gql from 'graphql-tag'
2

3
export const VideosQuery = gql`
×
4
  query VideosIndex($offset: Int! = 1, $limit: Int! = 16, $filters: VideoFilter = {}) {
5
    videos(limit: $limit, offset: $offset, filters: $filters) {
6
      pageNumber
7
      totalPages
8
      entries {
9
        id
10
        hashId
11
        youtubeId
12
        title
13
        insertedAt
14
        isPartner
15
        thumbnail
16
        speakers {
17
          fullName
18
          id
19
          slug
20
        }
21
      }
22
    }
23
  }
24
`
25

NEW
26
export const UserQuery = gql`
×
27
  query User($username: String!) {
28
    user(username: $username) {
29
      id
30
      username
31
      name
32
      reputation
33
      registeredAt
34
      pictureUrl
35
      miniPictureUrl
36
      achievements
37
    }
38
  }
39
`
40

UNCOV
41
export const VideosAddedByUserQuery = gql`
×
42
  query UserAddedVideosIndex($offset: Int! = 1, $limit: Int! = 16, $username: String!) {
43
    user(username: $username) {
44
      id
45
      videosAdded(limit: $limit, offset: $offset) {
46
        pageNumber
47
        totalPages
48
        entries {
49
          id
50
          hashId
51
          youtubeId
52
          title
53
          insertedAt
54
          isPartner
55
          thumbnail
56
          speakers {
57
            fullName
58
            id
59
            slug
60
          }
61
        }
62
      }
63
    }
64
  }
65
`
66

67
export const loggedInUserSubscriptionsQuery = gql`
×
68
  query LoggedInUserSubscriptions($scopes: [String]) {
69
    loggedInUser {
70
      id
71
      subscriptions(scopes: $scopes) {
72
        id
73
        scope
74
        videoId
75
        isSubscribed
76
        video {
77
          hashId
78
          title
79
        }
80
      }
81
    }
82
  }
83
`
84

85
export const loggedInUserUnreadNotificationsCount = gql`
×
86
  query LoggedInUserUnreadNotificationsCount {
87
    loggedInUser {
88
      id
89
      notifications(filter: UNSEEN) {
90
        totalEntries
91
      }
92
    }
93
  }
94
`
95

96
export const loggedInUserPendingModerationCount = gql`
×
97
  query LoggedInUserUnreadNotificationsCount {
98
    loggedInUser {
99
      id
100
      actionsPendingModeration
101
    }
102
  }
103
`
104

105
export const loggedInUserTodayReputationGain = gql`
×
106
  query LoggedInUserTodayReputationGain {
107
    loggedInUser {
108
      id
109
      todayReputationGain
110
    }
111
  }
112
`
113

NEW
114
export const VideoDebateQuery = gql`
×
115
  query VideoDebate($id: ID!) {
116
    video(hashId: $id) {
117
      id
118
      hashId
119
      title
120
      url
121
      thumbnail
122
      language
123
      unlisted
124
      youtubeOffset
125
      speakers {
126
        id
127
        fullName
128
        slug
129
        picture
130
      }
131
      statements {
132
        id
133
        text
134
        time
135
        isDraft
136
        speaker {
137
          id
138
          fullName
139
          picture
140
        }
141
        comments {
142
          id
143
          text
144
          approve
145
          score
146
          insertedAt
147
          replyToId
148
          user {
149
            id
150
            username
151
            pictureUrl
152
          }
153
          source {
154
            id
155
            url
156
          }
157
        }
158
      }
159
    }
160
  }
161
`
162

NEW
163
export const DELETE_STATEMENT_MUTATION = gql`
×
164
  mutation DeleteStatement($id: ID!) {
165
    deleteStatement(id: $id) {
166
      id
167
    }
168
  }
169
`
170

NEW
171
export const UPDATE_STATEMENT_MUTATION = gql`
×
172
  mutation UpdateStatement($id: ID!, $text: String, $time: Int, $speakerId: ID, $isDraft: Boolean) {
173
    updateStatement(id: $id, text: $text, time: $time, speakerId: $speakerId, isDraft: $isDraft) {
174
      id
175
      time
176
      text
177
      isDraft
178
      video {
179
        id
180
      }
181
    }
182
  }
183
`
184

NEW
185
export const CREATE_COMMENT_MUTATION = gql`
×
186
  mutation CreateComment(
187
    $statementId: ID!
188
    $text: String
189
    $source: String
190
    $replyToId: ID
191
    $approve: Boolean
192
  ) {
193
    createComment(
194
      statementId: $statementId
195
      text: $text
196
      source: $source
197
      replyToId: $replyToId
198
      approve: $approve
199
    ) {
200
      id
201
      text
202
      approve
203
      insertedAt
204
      replyToId
205
      statementId
206
      user {
207
        id
208
        username
209
        pictureUrl
210
      }
211
      source {
212
        id
213
        url
214
      }
215
    }
216
  }
217
`
218

NEW
219
export const DELETE_COMMENT_MUTATION = gql`
×
220
  mutation DeleteComment($id: ID!) {
221
    deleteComment(id: $id) {
222
      id
223
      statementId
224
      replyToId
225
    }
226
  }
227
`
228

NEW
229
export const VOTE_COMMENT_MUTATION = gql`
×
230
  mutation VoteComment($commentId: ID!, $value: Int!) {
231
    voteComment(commentId: $commentId, value: $value) {
232
      id
233
      score
234
    }
235
  }
236
`
237

NEW
238
export const FLAG_COMMENT_MUTATION = gql`
×
239
  mutation FlagComment($commentId: ID!, $reason: Int!) {
240
    flagComment(commentId: $commentId, reason: $reason) {
241
      id
242
    }
243
  }
244
`
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc