94fbabcdf9
* Notifications for when you are forwarded sats from a post Support notifications when a post for which you are forwarded gets zapped This is controlled by a new boolean flag in user settings * Send push notifications to forwarded users when they get forwarded sats * Add `Promise.allSettled` per PR feedback * Remove `FEE` act type when building forwarded zaps notifications Don't include `FEE` actions, only `TIP` actions to avoid "0 sats forwarded" notifications --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
96 lines
2.7 KiB
JavaScript
96 lines
2.7 KiB
JavaScript
import { gql } from 'graphql-tag'
|
|
|
|
export default gql`
|
|
extend type Query {
|
|
me(skipUpdate: Boolean): User
|
|
settings: User
|
|
user(name: String!): User
|
|
users: [User!]
|
|
nameAvailable(name: String!): Boolean!
|
|
topUsers(cursor: String, when: String, by: String): Users
|
|
topCowboys(cursor: String): Users
|
|
searchUsers(q: String!, limit: Int, similarity: Float): [User!]!
|
|
hasNewNotes: Boolean!
|
|
}
|
|
|
|
type Users {
|
|
cursor: String
|
|
users: [User!]!
|
|
}
|
|
|
|
extend type Mutation {
|
|
setName(name: String!): String
|
|
setSettings(tipDefault: Int!, turboTipping: Boolean!, fiatCurrency: String!, noteItemSats: Boolean!,
|
|
noteEarning: Boolean!, noteAllDescendants: Boolean!, noteMentions: Boolean!, noteDeposits: Boolean!,
|
|
noteInvites: Boolean!, noteJobIndicator: Boolean!, noteCowboyHat: Boolean!, hideInvoiceDesc: Boolean!,
|
|
hideFromTopUsers: Boolean!, hideCowboyHat: Boolean!, clickToLoadImg: Boolean!,
|
|
wildWestMode: Boolean!, greeterMode: Boolean!, nostrPubkey: String, nostrRelays: [String!], hideBookmarks: Boolean!,
|
|
noteForwardedSats: Boolean!): User
|
|
setPhoto(photoId: ID!): Int!
|
|
upsertBio(bio: String!): User!
|
|
setWalkthrough(tipPopover: Boolean, upvotePopover: Boolean): Boolean
|
|
unlinkAuth(authType: String!): AuthMethods!
|
|
linkUnverifiedEmail(email: String!): Boolean
|
|
subscribeUser(id: ID): User
|
|
hideWelcomeBanner: Boolean
|
|
}
|
|
|
|
type AuthMethods {
|
|
lightning: Boolean!
|
|
nostr: Boolean!
|
|
github: Boolean!
|
|
twitter: Boolean!
|
|
email: String
|
|
}
|
|
|
|
type User {
|
|
id: ID!
|
|
createdAt: Date!
|
|
name: String
|
|
nitems(when: String): Int!
|
|
nposts(when: String): Int!
|
|
ncomments(when: String): Int!
|
|
nbookmarks(when: String): Int!
|
|
stacked(when: String): Int!
|
|
spent(when: String): Int!
|
|
referrals(when: String): Int!
|
|
freePosts: Int!
|
|
freeComments: Int!
|
|
hasInvites: Boolean!
|
|
tipDefault: Int!
|
|
turboTipping: Boolean!
|
|
fiatCurrency: String!
|
|
nostrPubkey: String
|
|
nostrRelays: [String!]
|
|
bio: Item
|
|
bioId: Int
|
|
photoId: Int
|
|
streak: Int
|
|
maxStreak: Int
|
|
sats: Int!
|
|
since: Int
|
|
upvotePopover: Boolean!
|
|
tipPopover: Boolean!
|
|
noteItemSats: Boolean!
|
|
noteEarning: Boolean!
|
|
noteAllDescendants: Boolean!
|
|
noteMentions: Boolean!
|
|
noteDeposits: Boolean!
|
|
noteInvites: Boolean!
|
|
noteJobIndicator: Boolean!
|
|
noteCowboyHat: Boolean!
|
|
noteForwardedSats: Boolean!
|
|
hideInvoiceDesc: Boolean!
|
|
hideFromTopUsers: Boolean!
|
|
hideCowboyHat: Boolean!
|
|
hideBookmarks: Boolean!
|
|
hideWelcomeBanner: Boolean!
|
|
clickToLoadImg: Boolean!
|
|
wildWestMode: Boolean!
|
|
greeterMode: Boolean!
|
|
lastCheckedJobs: String
|
|
authMethods: AuthMethods!
|
|
meSubscription: Boolean!
|
|
}
|
|
`
|