2021-04-17 18:15:18 +00:00
|
|
|
import { gql } from '@apollo/client'
|
|
|
|
|
|
|
|
export const COMMENT_FIELDS = gql`
|
|
|
|
fragment CommentFields on Item {
|
|
|
|
id
|
|
|
|
parentId
|
|
|
|
createdAt
|
2023-01-12 23:53:09 +00:00
|
|
|
deletedAt
|
2021-04-17 18:15:18 +00:00
|
|
|
text
|
|
|
|
user {
|
|
|
|
name
|
2023-02-01 14:44:35 +00:00
|
|
|
streak
|
2021-08-10 22:59:06 +00:00
|
|
|
id
|
2021-04-17 18:15:18 +00:00
|
|
|
}
|
|
|
|
sats
|
2022-01-20 23:04:12 +00:00
|
|
|
upvotes
|
2021-04-27 21:30:58 +00:00
|
|
|
boost
|
2021-12-05 17:37:55 +00:00
|
|
|
meSats
|
2022-09-21 19:57:36 +00:00
|
|
|
meDontLike
|
2023-02-16 22:23:59 +00:00
|
|
|
meBookmark
|
2022-09-22 18:44:50 +00:00
|
|
|
outlawed
|
2022-09-27 21:19:15 +00:00
|
|
|
freebie
|
2022-05-17 22:09:15 +00:00
|
|
|
path
|
2022-09-02 13:19:25 +00:00
|
|
|
commentSats
|
2021-11-27 18:01:02 +00:00
|
|
|
mine
|
2023-02-24 16:02:20 +00:00
|
|
|
otsHash
|
2021-04-17 18:15:18 +00:00
|
|
|
ncomments
|
2021-07-08 00:15:27 +00:00
|
|
|
root {
|
|
|
|
id
|
|
|
|
title
|
2023-01-26 16:11:55 +00:00
|
|
|
bounty
|
|
|
|
bountyPaidTo
|
2021-10-27 18:26:34 +00:00
|
|
|
user {
|
|
|
|
name
|
2023-02-01 14:44:35 +00:00
|
|
|
streak
|
2021-10-27 18:26:34 +00:00
|
|
|
id
|
|
|
|
}
|
2021-07-08 00:15:27 +00:00
|
|
|
}
|
2021-04-17 18:15:18 +00:00
|
|
|
}
|
|
|
|
`
|
|
|
|
|
2021-06-24 23:56:01 +00:00
|
|
|
export const MORE_FLAT_COMMENTS = gql`
|
|
|
|
${COMMENT_FIELDS}
|
|
|
|
|
2021-12-16 23:05:31 +00:00
|
|
|
query MoreFlatComments($sort: String!, $cursor: String, $name: String, $within: String) {
|
|
|
|
moreFlatComments(sort: $sort, cursor: $cursor, name: $name, within: $within) {
|
2021-06-24 23:56:01 +00:00
|
|
|
cursor
|
|
|
|
comments {
|
2022-10-25 21:35:32 +00:00
|
|
|
...CommentFields
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
|
|
|
export const TOP_COMMENTS = gql`
|
|
|
|
${COMMENT_FIELDS}
|
|
|
|
|
2022-10-26 14:56:22 +00:00
|
|
|
query topComments($sort: String, $cursor: String, $when: String = "day") {
|
2022-10-25 21:35:32 +00:00
|
|
|
topComments(sort: $sort, cursor: $cursor, when: $when) {
|
|
|
|
cursor
|
|
|
|
comments {
|
2021-06-24 23:56:01 +00:00
|
|
|
...CommentFields
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
2021-04-17 18:15:18 +00:00
|
|
|
export const COMMENTS = gql`
|
|
|
|
${COMMENT_FIELDS}
|
|
|
|
|
|
|
|
fragment CommentsRecursive on Item {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
2021-05-05 18:13:14 +00:00
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-17 18:15:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`
|