intro inbox service

This commit is contained in:
knst-kotov
2022-02-22 14:44:01 +03:00
parent 30f965e6e9
commit c04cd77418
8 changed files with 136 additions and 64 deletions

View File

@@ -17,11 +17,6 @@ type UserResult {
user: User
}
type MessageResult {
error: String
message: Message
}
input ShoutInput {
slug: String!
body: String!
@@ -58,29 +53,6 @@ type CommentResult {
comment: Comment
}
enum MessageStatus {
NEW
UPDATED
DELETED
}
type ChatUpdatedResult {
error: String
status: MessageStatus
message: Message
}
type CreateChatResult {
chatId: String
error: String
}
type EnterChatResult {
chat: Chat
messages: [Message]
error: String
}
input TopicInput {
slug: String!
title: String
@@ -111,12 +83,6 @@ type CommentUpdatedResult {
################################### Mutation
type Mutation {
# message
createChat(description: String): CreateChatResult!
createMessage(chatId: String!, body: String!, replyTo: Int): MessageResult!
updateMessage(chatId: String!, id: Int!, body: String!): MessageResult!
deleteMessage(chatId: String!, id: Int!): Result!
# auth
confirmEmail(token: String!): AuthResult!
registerUser(email: String!, password: String): AuthResult!
@@ -172,10 +138,6 @@ type Query {
userSubscribers(slug: String!): [User]!
userSubscribedTopics(slug: String!): [Topic]!
# messages
enterChat(chatId: String!, size: Int = 50): EnterChatResult!
getMessages(chatId: String!, size: Int!, page: Int!): [Message]!
# shouts
getShoutBySlug(slug: String!): Shout!
shoutsByTopic(topic: String!, page: Int!, size: Int!): [Shout]!
@@ -209,7 +171,6 @@ type Query {
############################################ Subscription
type Subscription {
chatUpdated(chatId: String!): ChatUpdatedResult!
onlineUpdated: [User!]!
shoutUpdated: Shout!
userUpdated: User!
@@ -282,24 +243,6 @@ type User {
old_id: String
}
type Message {
author: String!
chatRoom: Int!
body: String!
createdAt: DateTime!
id: Int!
replyTo: Int
updatedAt: DateTime!
visibleForUsers: [Int]!
}
type Chat {
id: Int!
createdAt: DateTime!
updatedAt: DateTime!
description: String
}
type Comment {
id: Int!
author: User!