54 lines
1.0 KiB
JavaScript
Raw Normal View History

2021-03-25 14:29:24 -05:00
import { gql } from 'apollo-server-micro'
export default gql`
extend type Query {
me: User
2021-05-21 17:32:21 -05:00
user(name: String!): User
2021-03-25 14:29:24 -05:00
users: [User!]
2021-05-21 17:32:21 -05:00
nameAvailable(name: String!): Boolean!
2022-02-02 15:50:12 -06:00
topUsers(cursor: String, within: String!, userType: String!): TopUsers
2021-12-16 18:01:02 -06:00
}
type Users {
cursor: String
users: [User!]!
2021-03-25 14:29:24 -05:00
}
2022-02-02 15:50:12 -06:00
type TopUsers {
cursor: String
users: [TopUser!]!
}
type TopUser {
name: String!
createdAt: String!
amount: Int!
}
2021-05-21 19:09:11 -05:00
extend type Mutation {
setName(name: String!): Boolean
2021-10-30 11:20:11 -05:00
setSettings(tipDefault: Int!): Boolean
2021-09-24 16:28:21 -05:00
upsertBio(bio: String!): User!
2021-12-09 14:40:40 -06:00
setWalkthrough(tipPopover: Boolean, upvotePopover: Boolean): Boolean
2021-05-21 19:09:11 -05:00
}
2021-03-25 14:29:24 -05:00
type User {
id: ID!
2021-09-24 16:28:21 -05:00
createdAt: String!
2021-03-25 14:29:24 -05:00
name: String
2021-04-22 17:14:32 -05:00
nitems: Int!
ncomments: Int!
stacked: Int!
2021-05-24 19:08:56 -05:00
freePosts: Int!
freeComments: Int!
2021-06-24 18:56:01 -05:00
hasNewNotes: Boolean!
2021-10-15 18:07:51 -05:00
hasInvites: Boolean!
2021-09-12 11:55:38 -05:00
tipDefault: Int!
2021-09-23 12:42:00 -05:00
bio: Item
2021-04-22 17:14:32 -05:00
sats: Int!
2021-05-12 18:04:19 -05:00
msats: Int!
2021-12-09 14:40:40 -06:00
upvotePopover: Boolean!
tipPopover: Boolean!
2021-03-25 14:29:24 -05:00
}
`