2021-09-24 21:28:21 +00:00
|
|
|
import { gql } from '@apollo/client'
|
2021-09-30 15:46:58 +00:00
|
|
|
import { ITEM_FIELDS, ITEM_WITH_COMMENTS } from './items'
|
2021-09-24 21:28:21 +00:00
|
|
|
|
|
|
|
export const USER_FIELDS = gql`
|
|
|
|
${ITEM_FIELDS}
|
|
|
|
fragment UserFields on User {
|
|
|
|
id
|
|
|
|
createdAt
|
|
|
|
name
|
|
|
|
nitems
|
|
|
|
ncomments
|
|
|
|
stacked
|
|
|
|
sats
|
|
|
|
bio {
|
|
|
|
...ItemFields
|
|
|
|
text
|
|
|
|
}
|
|
|
|
}`
|
2021-09-30 15:46:58 +00:00
|
|
|
|
|
|
|
export const USER_FULL = name => gql`
|
|
|
|
${USER_FIELDS}
|
|
|
|
${ITEM_WITH_COMMENTS}
|
|
|
|
{
|
|
|
|
user(name: "${name}") {
|
|
|
|
...UserFields
|
|
|
|
bio {
|
|
|
|
...ItemWithComments
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`
|