Parameters
string
required
A GraphQL query string.
Record<string, any>
The named variables your query accepts. If your query has no variables, you needn’t pass any.
Returns
Promise<Record<string, any>>
A
Promise to the structured JSON as defined by your query.Example
To run multiple GraphQL queries in parallel, userunQuery() together with useAsyncCache(). Each call to runQuery() in the cache definition runs in parallel, and the component suspends until all have completed: