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