From c7110e234fda6b56a64baa18399b356c217cc9fd Mon Sep 17 00:00:00 2001 From: Tony Rewin Date: Fri, 6 Oct 2023 13:01:47 +0300 Subject: [PATCH] schema-unique-type-result-fix --- inbox.graphql | 74 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/inbox.graphql b/inbox.graphql index 64335fa..c766eb5 100644 --- a/inbox.graphql +++ b/inbox.graphql @@ -5,9 +5,9 @@ type _Service { } enum MessageStatus { - NEW - UPDATED - DELETED + NEW + UPDATED + DELETED } type ChatMember { @@ -28,7 +28,7 @@ input ChatInput { description: String } -type Result { +type ChatResult { error: String chat: Chat chats: [Chat] @@ -39,15 +39,15 @@ type Result { type Mutation { - # inbox - createChat(title: String, members: [Int]!): Result! - updateChat(chat: ChatInput!): Result! - deleteChat(chatId: String!): Result! + # inbox + createChat(title: String, members: [Int]!): ChatResult! + updateChat(chat: ChatInput!): ChatResult! + deleteChat(chatId: String!): ChatResult! - createMessage(chat: String!, body: String!, replyTo: Int): Result! - updateMessage(chatId: String!, id: Int!, body: String!): Result! - deleteMessage(chatId: String!, id: Int!): Result! - markAsRead(chatId: String!, ids: [Int]!): Result! + createMessage(chat: String!, body: String!, replyTo: Int): ChatResult! + updateMessage(chatId: String!, id: Int!, body: String!): ChatResult! + deleteMessage(chatId: String!, id: Int!): ChatResult! + markAsRead(chatId: String!, ids: [Int]!): ChatResult! } @@ -62,36 +62,36 @@ input MessagesBy { type Query { # inbox - loadChats( limit: Int, offset: Int): Result! # your chats - loadMessagesBy(by: MessagesBy!, limit: Int, offset: Int): Result! - loadRecipients(limit: Int, offset: Int): Result! - searchRecipients(query: String!, limit: Int, offset: Int): Result! - searchMessages(by: MessagesBy!, limit: Int, offset: Int): Result! + loadChats( limit: Int, offset: Int): ChatResult! # your chats + loadMessagesBy(by: MessagesBy!, limit: Int, offset: Int): ChatResult! + loadRecipients(limit: Int, offset: Int): ChatResult! + searchRecipients(query: String!, limit: Int, offset: Int): ChatResult! + searchMessages(by: MessagesBy!, limit: Int, offset: Int): ChatResult! _service: _Service! } type Message { - author: Int! - chatId: String! - body: String! - createdAt: Int! - id: Int! - replyTo: Int - updatedAt: Int - seen: Boolean + author: Int! + chatId: String! + body: String! + createdAt: Int! + id: Int! + replyTo: Int + updatedAt: Int + seen: Boolean } type Chat { - id: String! - createdAt: Int! - createdBy: Int! - updatedAt: Int! - title: String - description: String - users: [Int] - members: [ChatMember] - admins: [Int] - messages: [Message] - unread: Int - private: Boolean + id: String! + createdAt: Int! + createdBy: Int! + updatedAt: Int! + title: String + description: String + users: [Int] + members: [ChatMember] + admins: [Int] + messages: [Message] + unread: Int + private: Boolean }