stacker.news/api/typeDefs/sub.js

34 lines
752 B
JavaScript
Raw Normal View History

import { gql } from 'graphql-tag'
2022-02-17 17:23:43 +00:00
export default gql`
extend type Query {
sub(name: String): Sub
2023-05-01 20:58:30 +00:00
subLatestPost(name: String!): String
2023-11-21 23:32:22 +00:00
subs: [Sub!]!
}
extend type Mutation {
upsertSub(name: String!, desc: String, baseCost: Int!,
2023-12-08 20:02:00 +00:00
postTypes: [String!]!, billingType: String!, billingAutoRenew: Boolean!,
hash: String, hmac: String): Sub
2023-11-21 23:32:22 +00:00
paySub(name: String!, hash: String, hmac: String): Sub
2022-02-17 17:23:43 +00:00
}
type Sub {
2023-11-21 23:32:22 +00:00
name: ID!
2023-07-27 00:18:42 +00:00
createdAt: Date!
2023-11-21 23:32:22 +00:00
userId: Int!
user: User!
desc: String
2023-07-27 00:18:42 +00:00
updatedAt: Date!
2022-02-17 17:23:43 +00:00
postTypes: [String!]!
2023-11-21 23:32:22 +00:00
billingCost: Int!
billingType: String!
2023-12-08 20:02:00 +00:00
billingAutoRenew: Boolean!
2022-02-17 17:23:43 +00:00
rankingType: String!
2023-11-21 23:32:22 +00:00
billedLastAt: Date!
2022-02-17 17:23:43 +00:00
baseCost: Int!
2023-11-21 23:32:22 +00:00
status: String!
2022-02-17 17:23:43 +00:00
}
`