stacker.news/fragments/comments.js

121 lines
3.5 KiB
JavaScript
Raw Normal View History

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