A schema defines a type system of GraphQL API. It describes the complete set of possible data (objects, fields, relationships, everything) that a client can access.
TON Labs GraphQL schema has three root types:
The mutation type defines GraphQL operations that change data on the server. It is analogous to performing HTTP verbs such as
DELETE. Mutations are used to send messages to the blockchain. We recommend to do it only via SDK, not directly.
The subscription root type – a long‐lived request that fetches data in response to source events.
- rempReceipts - subscription for REMP processing status receipts of a message (by messageId)
- postRequests - used to send messages to blockchain.
Here you can see a request for account's information and the last transaction with a subset of fields. All available fields with their descriptions can be found in data schema in playground.
A selection set must contain only scalar fields, otherwise you will get an error. A scalar field describes one discrete piece of information available to a request within a selection set. If field is an object, you need to specify the fields of this object.
Read more in the next sections.