2023-07-23 10:08:43 -05:00
|
|
|
import { gql } from 'graphql-tag'
|
2022-02-17 11:23:43 -06:00
|
|
|
|
|
|
|
export default gql`
|
|
|
|
extend type Query {
|
2023-07-23 10:08:43 -05:00
|
|
|
sub(name: String): Sub
|
2023-05-01 15:58:30 -05:00
|
|
|
subLatestPost(name: String!): String
|
2023-11-21 17:32:22 -06:00
|
|
|
subs: [Sub!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
2024-01-11 17:45:17 -06:00
|
|
|
upsertSub(oldName: String, name: String!, desc: String, baseCost: Int!,
|
2023-12-10 15:41:20 -06:00
|
|
|
postTypes: [String!]!, allowFreebies: Boolean!,
|
|
|
|
billingType: String!, billingAutoRenew: Boolean!,
|
2023-12-23 14:26:16 -06:00
|
|
|
moderated: Boolean!, hash: String, hmac: String): Sub
|
2023-11-21 17:32:22 -06:00
|
|
|
paySub(name: String!, hash: String, hmac: String): Sub
|
2023-12-15 12:10:29 -06:00
|
|
|
toggleMuteSub(name: String!): Boolean!
|
2022-02-17 11:23:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
type Sub {
|
2023-11-21 17:32:22 -06:00
|
|
|
name: ID!
|
2023-07-26 19:18:42 -05:00
|
|
|
createdAt: Date!
|
2023-11-21 17:32:22 -06:00
|
|
|
userId: Int!
|
|
|
|
user: User!
|
|
|
|
desc: String
|
2023-07-26 19:18:42 -05:00
|
|
|
updatedAt: Date!
|
2022-02-17 11:23:43 -06:00
|
|
|
postTypes: [String!]!
|
2023-12-10 15:41:20 -06:00
|
|
|
allowFreebies: Boolean!
|
2023-11-21 17:32:22 -06:00
|
|
|
billingCost: Int!
|
|
|
|
billingType: String!
|
2023-12-08 14:02:00 -06:00
|
|
|
billingAutoRenew: Boolean!
|
2022-02-17 11:23:43 -06:00
|
|
|
rankingType: String!
|
2023-11-21 17:32:22 -06:00
|
|
|
billedLastAt: Date!
|
2022-02-17 11:23:43 -06:00
|
|
|
baseCost: Int!
|
2023-11-21 17:32:22 -06:00
|
|
|
status: String!
|
2023-12-23 14:26:16 -06:00
|
|
|
moderated: Boolean!
|
|
|
|
moderatedCount: Int!
|
2023-12-15 12:10:29 -06:00
|
|
|
meMuteSub: Boolean!
|
2022-02-17 11:23:43 -06:00
|
|
|
}
|
|
|
|
`
|