2023-07-23 10:08:43 -05:00
|
|
|
import { gql } from 'graphql-tag'
|
2021-03-25 14:29:24 -05:00
|
|
|
|
|
|
|
export default gql`
|
|
|
|
extend type Query {
|
2023-10-23 18:19:36 -05:00
|
|
|
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!
|
2024-03-01 10:28:55 -06:00
|
|
|
topUsers(cursor: String, when: String, from: String, to: String, by: String, limit: Limit): UsersNullable!
|
|
|
|
topCowboys(cursor: String): UsersNullable!
|
2023-11-22 10:30:43 -06:00
|
|
|
searchUsers(q: String!, limit: Limit, similarity: Float): [User!]!
|
|
|
|
userSuggestions(q: String, limit: Limit): [User!]!
|
2022-11-07 17:31:29 -06:00
|
|
|
hasNewNotes: Boolean!
|
2021-12-16 18:01:02 -06:00
|
|
|
}
|
|
|
|
|
2024-03-01 10:28:55 -06:00
|
|
|
type UsersNullable {
|
|
|
|
cursor: String
|
|
|
|
users: [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 {
|
2023-07-23 10:08:43 -05:00
|
|
|
setName(name: String!): String
|
2023-11-09 19:05:35 -06:00
|
|
|
setSettings(settings: SettingsInput!): 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
|
2023-09-11 17:29:45 -04:00
|
|
|
hideWelcomeBanner: Boolean
|
2023-09-18 14:20:02 -04:00
|
|
|
subscribeUserPosts(id: ID): User
|
|
|
|
subscribeUserComments(id: ID): User
|
2023-09-28 15:02:25 -05:00
|
|
|
toggleMute(id: ID): User
|
2024-03-14 21:32:34 +01:00
|
|
|
generateApiKey(id: ID!): String
|
|
|
|
deleteApiKey(id: ID!): User
|
2022-06-02 17:55:23 -05:00
|
|
|
}
|
|
|
|
|
2021-03-25 14:29:24 -05:00
|
|
|
type User {
|
|
|
|
id: ID!
|
2023-07-26 19:18:42 -05:00
|
|
|
createdAt: Date!
|
2021-03-25 14:29:24 -05:00
|
|
|
name: String
|
2023-11-08 21:15:36 -03:00
|
|
|
nitems(when: String, from: String, to: String): Int!
|
|
|
|
nposts(when: String, from: String, to: String): Int!
|
2024-02-21 20:55:48 -05:00
|
|
|
nterritories(when: String, from: String, to: String): Int!
|
2023-11-08 21:15:36 -03:00
|
|
|
ncomments(when: String, from: String, to: String): Int!
|
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-06-02 19:55:45 -05:00
|
|
|
since: Int
|
2023-11-09 19:05:35 -06:00
|
|
|
|
|
|
|
optional: UserOptional!
|
|
|
|
privates: UserPrivates
|
|
|
|
|
|
|
|
meMute: Boolean!
|
|
|
|
meSubscriptionPosts: Boolean!
|
|
|
|
meSubscriptionComments: Boolean!
|
|
|
|
}
|
|
|
|
|
|
|
|
input SettingsInput {
|
|
|
|
autoDropBolt11s: Boolean!
|
|
|
|
diagnostics: Boolean!
|
2024-03-17 15:57:50 +01:00
|
|
|
noReferralLinks: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
fiatCurrency: String!
|
|
|
|
greeterMode: Boolean!
|
|
|
|
hideBookmarks: Boolean!
|
|
|
|
hideCowboyHat: Boolean!
|
2024-02-14 14:33:31 -05:00
|
|
|
hideGithub: Boolean!
|
|
|
|
hideNostr: Boolean!
|
|
|
|
hideTwitter: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
hideFromTopUsers: Boolean!
|
|
|
|
hideInvoiceDesc: Boolean!
|
|
|
|
hideIsContributor: Boolean!
|
|
|
|
hideWalletBalance: Boolean!
|
|
|
|
imgproxyOnly: Boolean!
|
2023-10-04 13:47:09 -05:00
|
|
|
nostrCrossposting: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
nostrPubkey: String
|
|
|
|
nostrRelays: [String!]
|
2022-04-21 17:50:02 -05:00
|
|
|
noteAllDescendants: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
noteCowboyHat: Boolean!
|
2024-03-25 21:20:11 +01:00
|
|
|
noteDeposits: Boolean!,
|
|
|
|
noteWithdrawals: Boolean!,
|
2023-11-09 19:05:35 -06:00
|
|
|
noteEarning: Boolean!
|
|
|
|
noteForwardedSats: Boolean!
|
2022-04-21 17:50:02 -05:00
|
|
|
noteInvites: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
noteItemSats: Boolean!
|
2022-05-09 12:30:27 -05:00
|
|
|
noteJobIndicator: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
noteMentions: Boolean!
|
2024-02-09 21:35:32 -05:00
|
|
|
nsfwMode: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
tipDefault: Int!
|
|
|
|
turboTipping: Boolean!
|
2024-03-25 01:46:12 +01:00
|
|
|
zapUndos: Int
|
2023-11-09 19:05:35 -06:00
|
|
|
wildWestMode: Boolean!
|
|
|
|
withdrawMaxFeeDefault: Int!
|
|
|
|
}
|
|
|
|
|
|
|
|
type AuthMethods {
|
|
|
|
lightning: Boolean!
|
|
|
|
nostr: Boolean!
|
|
|
|
github: Boolean!
|
|
|
|
twitter: Boolean!
|
|
|
|
email: String
|
2024-03-28 12:34:14 -05:00
|
|
|
apiKey: Boolean
|
2023-11-09 19:05:35 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type UserPrivates {
|
|
|
|
"""
|
|
|
|
extremely sensitive
|
|
|
|
"""
|
|
|
|
sats: Int!
|
|
|
|
authMethods: AuthMethods!
|
2024-01-07 11:00:24 -06:00
|
|
|
lnAddr: String
|
2023-11-09 19:05:35 -06:00
|
|
|
|
|
|
|
"""
|
|
|
|
only relevant to user
|
|
|
|
"""
|
|
|
|
lastCheckedJobs: String
|
|
|
|
hideWelcomeBanner: Boolean!
|
|
|
|
tipPopover: Boolean!
|
|
|
|
upvotePopover: Boolean!
|
|
|
|
hasInvites: Boolean!
|
2024-03-14 21:32:34 +01:00
|
|
|
apiKeyEnabled: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
|
|
|
|
"""
|
|
|
|
mirrors SettingsInput
|
|
|
|
"""
|
2023-11-09 14:50:43 -03:00
|
|
|
autoDropBolt11s: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
diagnostics: Boolean!
|
2024-03-17 15:57:50 +01:00
|
|
|
noReferralLinks: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
fiatCurrency: String!
|
|
|
|
greeterMode: Boolean!
|
2023-08-23 16:29:55 -04:00
|
|
|
hideBookmarks: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
hideCowboyHat: Boolean!
|
2024-02-14 14:33:31 -05:00
|
|
|
hideGithub: Boolean!
|
|
|
|
hideNostr: Boolean!
|
|
|
|
hideTwitter: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
hideFromTopUsers: Boolean!
|
|
|
|
hideInvoiceDesc: Boolean!
|
|
|
|
hideIsContributor: Boolean!
|
2023-09-12 19:19:26 +02:00
|
|
|
hideWalletBalance: Boolean!
|
2023-10-03 20:05:04 +02:00
|
|
|
imgproxyOnly: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
nostrCrossposting: Boolean!
|
|
|
|
nostrPubkey: String
|
|
|
|
nostrRelays: [String!]
|
|
|
|
noteAllDescendants: Boolean!
|
|
|
|
noteCowboyHat: Boolean!
|
|
|
|
noteDeposits: Boolean!
|
2024-03-25 21:20:11 +01:00
|
|
|
noteWithdrawals: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
noteEarning: Boolean!
|
|
|
|
noteForwardedSats: Boolean!
|
|
|
|
noteInvites: Boolean!
|
|
|
|
noteItemSats: Boolean!
|
|
|
|
noteJobIndicator: Boolean!
|
|
|
|
noteMentions: Boolean!
|
2024-02-09 21:35:32 -05:00
|
|
|
nsfwMode: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
tipDefault: Int!
|
|
|
|
turboTipping: Boolean!
|
2024-03-25 01:46:12 +01:00
|
|
|
zapUndos: Int
|
2022-09-21 14:57:36 -05:00
|
|
|
wildWestMode: Boolean!
|
2023-11-09 19:05:35 -06:00
|
|
|
withdrawMaxFeeDefault: Int!
|
2024-01-07 11:00:24 -06:00
|
|
|
autoWithdrawThreshold: Int
|
2024-01-12 23:47:05 -06:00
|
|
|
autoWithdrawMaxFeePercent: Float
|
2023-11-09 19:05:35 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type UserOptional {
|
|
|
|
"""
|
|
|
|
conditionally private
|
|
|
|
"""
|
|
|
|
stacked(when: String, from: String, to: String): Int
|
|
|
|
spent(when: String, from: String, to: String): Int
|
|
|
|
referrals(when: String, from: String, to: String): Int
|
|
|
|
streak: Int
|
|
|
|
maxStreak: Int
|
|
|
|
isContributor: Boolean
|
2024-02-14 14:33:31 -05:00
|
|
|
githubId: String
|
|
|
|
twitterId: String
|
|
|
|
nostrAuthPubkey: String
|
2021-03-25 14:29:24 -05:00
|
|
|
}
|
|
|
|
`
|