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
|
|
|
|
text
|
|
|
|
user {
|
|
|
|
name
|
2021-08-10 17:59:06 -05:00
|
|
|
id
|
2021-04-17 13:15:18 -05:00
|
|
|
}
|
|
|
|
sats
|
2021-04-27 16:30:58 -05:00
|
|
|
boost
|
2021-09-10 16:13:52 -05:00
|
|
|
tips
|
|
|
|
meVote
|
|
|
|
meBoost
|
|
|
|
meTip
|
2021-04-17 13:15:18 -05:00
|
|
|
ncomments
|
2021-07-07 19:15:27 -05:00
|
|
|
root {
|
|
|
|
id
|
|
|
|
title
|
2021-10-27 13:26:34 -05:00
|
|
|
user {
|
|
|
|
name
|
|
|
|
id
|
|
|
|
}
|
2021-07-07 19:15:27 -05:00
|
|
|
}
|
2021-04-17 13:15:18 -05:00
|
|
|
}
|
|
|
|
`
|
|
|
|
|
2021-06-24 18:56:01 -05:00
|
|
|
export const MORE_FLAT_COMMENTS = gql`
|
|
|
|
${COMMENT_FIELDS}
|
|
|
|
|
2021-10-26 15:49:37 -05:00
|
|
|
query MoreFlatComments($cursor: String, $name: String!) {
|
|
|
|
moreFlatComments(cursor: $cursor, name: $name) {
|
2021-06-24 18:56:01 -05:00
|
|
|
cursor
|
|
|
|
comments {
|
|
|
|
...CommentFields
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`
|