schema-unique-type-result-fix
This commit is contained in:
parent
76b5512f4f
commit
c7110e234f
|
@ -5,9 +5,9 @@ type _Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MessageStatus {
|
enum MessageStatus {
|
||||||
NEW
|
NEW
|
||||||
UPDATED
|
UPDATED
|
||||||
DELETED
|
DELETED
|
||||||
}
|
}
|
||||||
|
|
||||||
type ChatMember {
|
type ChatMember {
|
||||||
|
@ -28,7 +28,7 @@ input ChatInput {
|
||||||
description: String
|
description: String
|
||||||
}
|
}
|
||||||
|
|
||||||
type Result {
|
type ChatResult {
|
||||||
error: String
|
error: String
|
||||||
chat: Chat
|
chat: Chat
|
||||||
chats: [Chat]
|
chats: [Chat]
|
||||||
|
@ -39,15 +39,15 @@ type Result {
|
||||||
|
|
||||||
|
|
||||||
type Mutation {
|
type Mutation {
|
||||||
# inbox
|
# inbox
|
||||||
createChat(title: String, members: [Int]!): Result!
|
createChat(title: String, members: [Int]!): ChatResult!
|
||||||
updateChat(chat: ChatInput!): Result!
|
updateChat(chat: ChatInput!): ChatResult!
|
||||||
deleteChat(chatId: String!): Result!
|
deleteChat(chatId: String!): ChatResult!
|
||||||
|
|
||||||
createMessage(chat: String!, body: String!, replyTo: Int): Result!
|
createMessage(chat: String!, body: String!, replyTo: Int): ChatResult!
|
||||||
updateMessage(chatId: String!, id: Int!, body: String!): Result!
|
updateMessage(chatId: String!, id: Int!, body: String!): ChatResult!
|
||||||
deleteMessage(chatId: String!, id: Int!): Result!
|
deleteMessage(chatId: String!, id: Int!): ChatResult!
|
||||||
markAsRead(chatId: String!, ids: [Int]!): Result!
|
markAsRead(chatId: String!, ids: [Int]!): ChatResult!
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,36 +62,36 @@ input MessagesBy {
|
||||||
|
|
||||||
type Query {
|
type Query {
|
||||||
# inbox
|
# inbox
|
||||||
loadChats( limit: Int, offset: Int): Result! # your chats
|
loadChats( limit: Int, offset: Int): ChatResult! # your chats
|
||||||
loadMessagesBy(by: MessagesBy!, limit: Int, offset: Int): Result!
|
loadMessagesBy(by: MessagesBy!, limit: Int, offset: Int): ChatResult!
|
||||||
loadRecipients(limit: Int, offset: Int): Result!
|
loadRecipients(limit: Int, offset: Int): ChatResult!
|
||||||
searchRecipients(query: String!, limit: Int, offset: Int): Result!
|
searchRecipients(query: String!, limit: Int, offset: Int): ChatResult!
|
||||||
searchMessages(by: MessagesBy!, limit: Int, offset: Int): Result!
|
searchMessages(by: MessagesBy!, limit: Int, offset: Int): ChatResult!
|
||||||
_service: _Service!
|
_service: _Service!
|
||||||
}
|
}
|
||||||
|
|
||||||
type Message {
|
type Message {
|
||||||
author: Int!
|
author: Int!
|
||||||
chatId: String!
|
chatId: String!
|
||||||
body: String!
|
body: String!
|
||||||
createdAt: Int!
|
createdAt: Int!
|
||||||
id: Int!
|
id: Int!
|
||||||
replyTo: Int
|
replyTo: Int
|
||||||
updatedAt: Int
|
updatedAt: Int
|
||||||
seen: Boolean
|
seen: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
type Chat {
|
type Chat {
|
||||||
id: String!
|
id: String!
|
||||||
createdAt: Int!
|
createdAt: Int!
|
||||||
createdBy: Int!
|
createdBy: Int!
|
||||||
updatedAt: Int!
|
updatedAt: Int!
|
||||||
title: String
|
title: String
|
||||||
description: String
|
description: String
|
||||||
users: [Int]
|
users: [Int]
|
||||||
members: [ChatMember]
|
members: [ChatMember]
|
||||||
admins: [Int]
|
admins: [Int]
|
||||||
messages: [Message]
|
messages: [Message]
|
||||||
unread: Int
|
unread: Int
|
||||||
private: Boolean
|
private: Boolean
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user