184 lines
4.5 KiB
JavaScript
Raw Normal View History

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!
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!]!
hasNewNotes: Boolean!
2021-12-16 18:01:02 -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 {
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
hideWelcomeBanner: Boolean
subscribeUserPosts(id: ID): User
subscribeUserComments(id: ID): User
2023-09-28 15:02:25 -05:00
toggleMute(id: ID): User
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
nitems(when: String, from: String, to: String): Int!
nposts(when: String, from: String, to: String): Int!
nterritories(when: String, from: String, to: String): Int!
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!
noReferralLinks: Boolean!
2023-11-09 19:05:35 -06:00
fiatCurrency: String!
greeterMode: Boolean!
hideBookmarks: Boolean!
hideCowboyHat: Boolean!
hideGithub: Boolean!
hideNostr: Boolean!
hideTwitter: Boolean!
2023-11-09 19:05:35 -06:00
hideFromTopUsers: Boolean!
hideInvoiceDesc: Boolean!
hideIsContributor: Boolean!
hideWalletBalance: Boolean!
imgproxyOnly: Boolean!
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!
noteJobIndicator: Boolean!
2023-11-09 19:05:35 -06:00
noteMentions: Boolean!
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!
apiKeyEnabled: Boolean!
2023-11-09 19:05:35 -06:00
"""
mirrors SettingsInput
"""
autoDropBolt11s: Boolean!
2023-11-09 19:05:35 -06:00
diagnostics: Boolean!
noReferralLinks: Boolean!
2023-11-09 19:05:35 -06:00
fiatCurrency: String!
greeterMode: Boolean!
hideBookmarks: Boolean!
2023-11-09 19:05:35 -06:00
hideCowboyHat: Boolean!
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-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!
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
githubId: String
twitterId: String
nostrAuthPubkey: String
2021-03-25 14:29:24 -05:00
}
`