update topics logix

This commit is contained in:
2021-10-28 13:42:34 +03:00
parent 0d87f52d3a
commit 741ede054d
9 changed files with 79 additions and 13 deletions

View File

@@ -75,6 +75,10 @@ type Mutation {
# rateUser(value: Int!): Result!
# updateOnlineStatus: Result!
updateProfile(profile: ProfileInput!): Result!
# topics
topicSubscribe(slug: String!): Result!
topicUnsubscribe(slug: String!): Result!
}
################################### Query
@@ -107,6 +111,11 @@ type Query {
favoritesShouts(limit: Int): [Shout]!
topAuthors(limit: Int): [User]!
# topics
topicsBySlugs(slugs: [String]!): [Topic]!
topicsByCommunity(community: String!): [Topic]!
topicsByAuthor(author: String!): [Topic]!
# getOnlineUsers: [User!]!
}
@@ -120,6 +129,7 @@ type Subscription {
onlineUpdated: [User!]!
shoutUpdated: Shout!
userUpdated: User!
topicUpdated: Shout!
}
############################################ Entities
@@ -253,8 +263,6 @@ type Topic {
title: String
body: String
pic: String
createdBy: Int! # User
createdAt: DateTime!
parents: [String] # NOTE: topic can have parent topics
children: [String] # and children
cat_id: String