proposals and refactoring

This commit is contained in:
2022-06-19 20:54:39 +03:00
parent 30c51ecac1
commit 11f81d46ce
9 changed files with 545 additions and 370 deletions

View File

@@ -126,15 +126,26 @@ type Mutation {
createTopic(input: TopicInput!): TopicResult!
updateTopic(input: TopicInput!): TopicResult!
# comments
createComment(body: String!, shout: String!, replyTo: Int): CommentResult!
updateComment(id: Int!, body: String!): CommentResult!
deleteComment(id: Int!): Result!
rateComment(id: Int!, value: Int!): Result!
# community
createCommunity(title: String!, desc: String!): Community!
updateCommunity(community: CommunityInput!): Community!
deleteCommunity(id: Int!): Result!
# proposal
createProposal(body: String!, range: String): Proposal!
updateProposal(body: String!, range: String): Proposal!
acceptProposal(id: Int!): Result!
declineProposal(id: Int!): Result!
disableProposal(id: Int!): Result!
deleteProposal(id: Int!): Result!
rateProposal(id: Int!): Result!
subscribe(what: SubscriptionType!, slug: String!): Result!
unsubscribe(what: SubscriptionType!, slug: String!): Result!
}
@@ -167,6 +178,9 @@ type Query {
shoutsByCommunities(slugs: [String]!, page: Int!, size: Int!): [Shout]!
getShoutComments(slug: String!): [Comment]!
# collab
getShoutProposals(slug: String!): [Proposal]!
# mainpage
topViewed(page: Int!, size: Int!): [Shout]!
topMonth(page: Int!, size: Int!): [Shout]!
@@ -353,17 +367,29 @@ type Topic {
topicStat: TopicStat
}
enum ProposalStatus {
NEW
UPDATED
UPDATED_RATING
ACCEPTED
DECLINED
DISABLED
DELETED
}
type Proposal {
createdBy: String!
shout: string!
shout: String!
range: String # full / 0:2340
body: String!
createdAt: DateTime!
createdBy: String!
updatedAt: DateTime
acceptedAt: DateTime
acceptedBy: string
acceptedBy: Int
declinedAt: DateTime
declinedBy: string
declinedBy: Int
disabledAt: DateTime
disabledBy: Int
}
type Token {