Skip to content

Commit

Permalink
add USER_WITH_SUBS query for user territories page
Browse files Browse the repository at this point in the history
  • Loading branch information
mzivil committed Feb 21, 2024
1 parent daed9a7 commit af95c64
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions fragments/users.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { gql } from '@apollo/client'
import { COMMENTS, COMMENTS_ITEM_EXT_FIELDS } from './comments'
import { ITEM_FIELDS, ITEM_FULL_FIELDS } from './items'
import { SUB_FULL_FIELDS } from './subs'

export const ME = gql`
{
Expand Down Expand Up @@ -282,3 +283,26 @@ export const USER_WITH_ITEMS = gql`
}
}
}`

export const USER_WITH_SUBS = gql`
${USER_FIELDS}
${SUB_FULL_FIELDS}
query UserWithSubs($name: String!, $cursor: String, $type: String, $when: String, $from: String, $to: String, $by: String) {
user(name: $name) {
...UserFields
}
userSubs(name: $name, cursor: $cursor) {
cursor
subs {
...SubFullFields
ncomments(when: "forever")
nposts(when: "forever")
optional {
stacked(when: "forever")
spent(when: "forever")
revenue(when: "forever")
}
}
}
}`

0 comments on commit af95c64

Please sign in to comment.