2021-03-25 14:29:24 -05:00
|
|
|
import { gql } from 'apollo-server-micro'
|
|
|
|
|
|
|
|
export default gql`
|
|
|
|
extend type Query {
|
|
|
|
me: User
|
2022-06-02 17:55:23 -05:00
|
|
|
settings: 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-10-25 16:35:32 -05:00
|
|
|
topUsers(cursor: String, when: String, sort: String): Users
|
2022-10-25 12:13:06 -05:00
|
|
|
searchUsers(q: String!, limit: Int, similarity: Float): [User!]!
|
2021-12-16 18:01:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type Users {
|
|
|
|
cursor: String
|
|
|
|
users: [User!]!
|
2021-03-25 14:29:24 -05:00
|
|
|
}
|
|
|
|
|
2021-05-21 19:09:11 -05:00
|
|
|
extend type Mutation {
|
|
|
|
setName(name: String!): Boolean
|
2022-09-13 01:18:23 +02:00
|
|
|
setSettings(tipDefault: Int!, fiatCurrency: String!, noteItemSats: Boolean!, noteEarning: Boolean!,
|
2022-04-21 17:50:02 -05:00
|
|
|
noteAllDescendants: Boolean!, noteMentions: Boolean!, noteDeposits: Boolean!,
|
2022-09-27 16:19:15 -05:00
|
|
|
noteInvites: Boolean!, noteJobIndicator: Boolean!, hideInvoiceDesc: Boolean!,
|
|
|
|
wildWestMode: Boolean!, greeterMode: Boolean!): User
|
2022-05-16 15:51:22 -05:00
|
|
|
setPhoto(photoId: ID!): Int!
|
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
|
2022-06-02 17:55:23 -05:00
|
|
|
unlinkAuth(authType: String!): AuthMethods!
|
|
|
|
linkUnverifiedEmail(email: String!): Boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
type AuthMethods {
|
|
|
|
lightning: Boolean!
|
|
|
|
email: String
|
|
|
|
twitter: Boolean!
|
|
|
|
github: 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!
|
2022-10-25 12:13:06 -05:00
|
|
|
spent: 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!
|
2022-09-13 02:24:31 +02:00
|
|
|
fiatCurrency: String!
|
2021-09-23 12:42:00 -05:00
|
|
|
bio: Item
|
2022-04-28 13:11:05 -05:00
|
|
|
bioId: Int
|
2022-05-16 15:51:22 -05:00
|
|
|
photoId: Int
|
2021-04-22 17:14:32 -05:00
|
|
|
sats: Int!
|
2021-12-09 14:40:40 -06:00
|
|
|
upvotePopover: Boolean!
|
|
|
|
tipPopover: Boolean!
|
2022-04-21 17:50:02 -05:00
|
|
|
noteItemSats: Boolean!
|
|
|
|
noteEarning: Boolean!
|
|
|
|
noteAllDescendants: Boolean!
|
|
|
|
noteMentions: Boolean!
|
|
|
|
noteDeposits: Boolean!
|
|
|
|
noteInvites: Boolean!
|
2022-05-09 12:30:27 -05:00
|
|
|
noteJobIndicator: Boolean!
|
2022-08-30 16:50:47 -05:00
|
|
|
hideInvoiceDesc: Boolean!
|
2022-09-21 14:57:36 -05:00
|
|
|
wildWestMode: Boolean!
|
2022-09-27 16:19:15 -05:00
|
|
|
greeterMode: Boolean!
|
2022-05-09 12:30:27 -05:00
|
|
|
lastCheckedJobs: String
|
2022-06-02 17:55:23 -05:00
|
|
|
authMethods: AuthMethods!
|
2021-03-25 14:29:24 -05:00
|
|
|
}
|
|
|
|
`
|