146b60278c
* wip adding cowboy credits * invite gift paid action * remove balance limit * remove p2p zap withdrawal notifications * credits typedefs * squash migrations * remove wallet limit stuff * CCs in item detail * comments with meCredits * begin including CCs in item stats/notifications * buy credits ui/mutation * fix old /settings/wallets paths * bios don't get sats * fix settings * make invites work with credits * restore migration from master * inform backend of send wallets on zap * satistics header * default receive options to true and squash migrations * fix paidAction query * add nav for credits * fix forever stacked count * ek suggested fixes * fix lint * fix freebies wrt CCs * add back disable freebies * trigger cowboy hat job on CC depletion * fix meMsats+meMcredits * Update api/paidAction/README.md Co-authored-by: ekzyis <ek@stacker.news> * remove expireBoost migration that doesn't work --------- Co-authored-by: ekzyis <ek@stacker.news>
112 lines
1.8 KiB
JavaScript
112 lines
1.8 KiB
JavaScript
import { gql } from '@apollo/client'
|
|
|
|
// we can't import from users because of circular dependency
|
|
const STREAK_FIELDS = gql`
|
|
fragment StreakFields on User {
|
|
optional {
|
|
streak
|
|
gunStreak
|
|
horseStreak
|
|
}
|
|
}
|
|
`
|
|
|
|
export const COMMENT_FIELDS = gql`
|
|
${STREAK_FIELDS}
|
|
fragment CommentFields on Item {
|
|
id
|
|
position
|
|
parentId
|
|
createdAt
|
|
deletedAt
|
|
text
|
|
user {
|
|
id
|
|
name
|
|
meMute
|
|
...StreakFields
|
|
}
|
|
sats
|
|
credits
|
|
meAnonSats @client
|
|
upvotes
|
|
freedFreebie
|
|
boost
|
|
meSats
|
|
meCredits
|
|
meDontLikeSats
|
|
meBookmark
|
|
meSubscription
|
|
outlawed
|
|
freebie
|
|
path
|
|
commentSats
|
|
commentCredits
|
|
mine
|
|
otsHash
|
|
ncomments
|
|
imgproxyUrls
|
|
rel
|
|
apiKey
|
|
invoice {
|
|
id
|
|
actionState
|
|
confirmedAt
|
|
}
|
|
cost
|
|
}
|
|
`
|
|
|
|
export const COMMENTS_ITEM_EXT_FIELDS = gql`
|
|
${STREAK_FIELDS}
|
|
fragment CommentItemExtFields on Item {
|
|
text
|
|
root {
|
|
id
|
|
title
|
|
bounty
|
|
bountyPaidTo
|
|
subName
|
|
sub {
|
|
name
|
|
userId
|
|
moderated
|
|
meMuteSub
|
|
}
|
|
user {
|
|
name
|
|
id
|
|
...StreakFields
|
|
}
|
|
}
|
|
}`
|
|
|
|
// we only get the first COMMENT_DEPTH_LIMIT comments
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|