GraphQL
runQuery()
Imperatively run an asynchronous GraphQL query
Parameters
query : string
A GraphQL query string.
If you’re using TypeScript and [default] import
this value from a .graphql
or .gql
file,
the variables and return value with be strongly typed.
variables? : 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.
Was this page helpful?