Usage
Input Parameters
- query:
string: The GraphQL query string. - variables:
object: The variables for the query.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
A highly customizable and versatile GraphQL client for React
const res = await toolkit.gql.query(query, variables).toPromise();
string: The GraphQL query string.object: The variables for the query.const query = `
query MyQuery($id: ID!) {
transaction(id: $id) {
id
owner {
address
}
fee {
ar
}
}
}
`;
const variables = {
id: 'QJRUEcVHqNxVX5PNfzIpBSgWJlFwhQ3RmWdYEohrbwo',
};
const res = await toolkit.gql.query(query, variables).toPromise();
console.log(res?.data);
{
"transaction": {
"id": "QJRUEcVHqNxVX5PNfzIpBSgWJlFwhQ3RmWdYEohrbwo",
"owner": { "address": "uk9eBF_jieshHtXfC9d1p81OHYJT8bTHazhfruLBCTA" },
"fee": { "ar": "0.000000000000" }
}
}
Was this page helpful?