Example Query
A breakdown of an example GraphQL query in inabit
A breakdown of an example GraphQL query in inabit
In GraphQL, queries are used to fetch data from the server. This example demonstrates how to retrieve detailed information about a transaction.
Let's walk through a more complex query and put this information in context.
The operation is named Transaction
.
This query retrieves detailed information about a transaction identified by its unique ID ($where
). Here's a breakdown of the fields being requested:
id
: The unique identifier of the transaction.
transactionType
: The type of the transaction.
createdAt
: The timestamp indicating when the transaction was created.
createdBy
: Information about the user who created the transaction, including their full name, first name, last name, user ID, and profile file ID.
txId
: The transaction ID.
contactCryptoAccount
: Details about the contact's crypto account, including the address, name, and contact's name.
kyt
: KYT (Know Your Transaction) status.
wallet
: Information about the wallet associated with the transaction, including its ID, name, external ID, associated organization ID, and exchange details.
financialAsset
: Details about the financial asset involved in the transaction, such as its ID, code, name, and precision.
blockchain
: Information about the blockchain associated with the transaction, including its ID, name, code, contract type, and network scanner URL.
amount
: The amount involved in the transaction.
rateEUR
and rateUSD
: Exchange rates for EUR and USD.
status
: The status of the transaction, including its category, status, exchange statuses, and transaction sub-statuses.
fee
: The fee associated with the transaction.
note
: Any additional notes or comments about the transaction.
swapAssetTo
: Details about the asset swapped to, including its code and precision.
swapToAmount
: The amount swapped to.
metaData
: Additional metadata associated with the transaction, including its value and metadata field details.
Upon successful execution, the response contains detailed information about the requested transaction.