2023-07-23 09:16:12 -05:00
|
|
|
import { gql } from 'apollo-server-micro'
|
2021-03-25 14:29:24 -05:00
|
|
|
|
|
|
|
export default gql`
|
|
|
|
extend type Query {
|
2023-05-07 10:44:57 -05:00
|
|
|
me(skipUpdate: Boolean): 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!
|
2023-07-23 09:16:12 -05:00
|
|
|
topUsers(cursor: String, when: String, sort: String): Users
|
2023-02-09 12:41:28 -06:00
|
|
|
topCowboys(cursor: String): Users
|
2022-10-25 12:13:06 -05:00
|
|
|
searchUsers(q: String!, limit: Int, similarity: Float): [User!]!
|
2022-11-07 17:31:29 -06:00
|
|
|
hasNewNotes: Boolean!
|
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 {
|
2023-07-23 09:16:12 -05:00
|
|
|
setName(name: String!): Boolean
|
2022-12-09 13:25:38 -06:00
|
|
|
setSettings(tipDefault: Int!, turboTipping: Boolean!, fiatCurrency: String!, noteItemSats: Boolean!,
|
|
|
|
noteEarning: Boolean!, noteAllDescendants: Boolean!, noteMentions: Boolean!, noteDeposits: Boolean!,
|
2023-05-01 16:49:47 -05:00
|
|
|
noteInvites: Boolean!, noteJobIndicator: Boolean!, noteCowboyHat: Boolean!, hideInvoiceDesc: Boolean!,
|
|
|
|
hideFromTopUsers: Boolean!, hideCowboyHat: Boolean!,
|
2023-01-06 18:53:09 -06:00
|
|
|
wildWestMode: Boolean!, greeterMode: Boolean!, nostrPubkey: String, nostrRelays: [String!]): 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!
|
2023-01-18 12:49:20 -06:00
|
|
|
slashtags: Boolean!
|
2022-06-02 17:55:23 -05:00
|
|
|
github: Boolean!
|
2023-01-18 12:49:20 -06:00
|
|
|
twitter: Boolean!
|
|
|
|
email: String
|
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
|
2022-10-26 09:56:22 -05:00
|
|
|
nitems(when: String): Int!
|
|
|
|
ncomments(when: String): Int!
|
2023-02-16 23:23:59 +01:00
|
|
|
nbookmarks(when: String): Int!
|
2022-10-26 09:56:22 -05:00
|
|
|
stacked(when: String): Int!
|
|
|
|
spent(when: String): Int!
|
2022-12-19 17:00:53 -06:00
|
|
|
referrals(when: String): Int!
|
2021-05-24 19:08:56 -05:00
|
|
|
freePosts: Int!
|
|
|
|
freeComments: Int!
|
2021-10-15 18:07:51 -05:00
|
|
|
hasInvites: Boolean!
|
2021-09-12 11:55:38 -05:00
|
|
|
tipDefault: Int!
|
2022-12-09 13:25:38 -06:00
|
|
|
turboTipping: Boolean!
|
2022-09-13 02:24:31 +02:00
|
|
|
fiatCurrency: String!
|
2023-01-06 18:53:09 -06:00
|
|
|
nostrPubkey: String
|
|
|
|
nostrRelays: [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
|
2023-02-01 08:44:35 -06:00
|
|
|
streak: Int
|
2023-07-13 02:10:29 +02:00
|
|
|
maxStreak: Int
|
2021-04-22 17:14:32 -05:00
|
|
|
sats: Int!
|
2023-06-02 19:55:45 -05:00
|
|
|
since: 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!
|
2023-02-01 08:44:35 -06:00
|
|
|
noteCowboyHat: Boolean!
|
2022-08-30 16:50:47 -05:00
|
|
|
hideInvoiceDesc: Boolean!
|
2022-12-01 15:31:04 -06:00
|
|
|
hideFromTopUsers: Boolean!
|
2023-05-01 16:49:47 -05:00
|
|
|
hideCowboyHat: 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
|
|
|
}
|
|
|
|
`
|