Chat

Centralized chat service for personal, group and in-game chats.

Introduction

Welcome to the official chat system documentation. This guide delineates the structured procedures to interact with the chat service through GraphQL. Clear examples for each function are provided for precise understanding.

Retrieving Chats

To systematically query all associated chat sessions, use the following:

query GetChats {
  chats {
    __typename
    ... on ChatsOk {
      result {
        id
        users {
          id
        }
        lastMessage {
          message
        }
      }
    }
    ... on Error {
      message
    }
  }
}

GraphQL enables you to query the exact data that you need. For example, if you need a user nickname to be returned additionally to user id, you can add it there.

Accessing Messages Within a Chat

For accessing the messages within a specified chat, use:

Variables:

Initiating a New Chat Session

To systematically initiate a new chat session:

Variables:

Transmitting a Message

For transmitting a message within a chat:

Variables:

Deletion of a Message

To systematically retract a message:

Variables:

Real-time Message Update Subscription

For users necessitating real-time updates:

Variables:

Any anomalies or issues encountered will be reported in the message field of the GraphQL response. For instance, the Error flag represents generic discrepancies.

Your adherence to this structured approach is highly esteemed. For further clarifications, kindly refer to the overarching documentation.

Last updated