From 9bf20a6875e646d965c2271ffa4173c7a29bd89b Mon Sep 17 00:00:00 2001 From: marcusperezNR <90863144+marcusperezNR@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:02:55 -0700 Subject: [PATCH] Revert "Revert "feat: Add Cancel Query Nerdgraph Block "" --- .../examples/async-queries-nrql-tutorial.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/content/docs/apis/nerdgraph/examples/async-queries-nrql-tutorial.mdx b/src/content/docs/apis/nerdgraph/examples/async-queries-nrql-tutorial.mdx index ac642230bac..9beb243a7be 100644 --- a/src/content/docs/apis/nerdgraph/examples/async-queries-nrql-tutorial.mdx +++ b/src/content/docs/apis/nerdgraph/examples/async-queries-nrql-tutorial.mdx @@ -68,3 +68,17 @@ Some important details about this query: * The `account` argument must match the `account` argument from the original query. * This query will return results if asynchronous execution has completed; otherwise it will return `queryProgress` data. * The query can be repeated verbatim until results or an error are returned. + +## Cancel an async query [#example-cancel-query] + +You can cancel an asynchronous query by using the `cancelAsyncQuery` mutation. This mutation takes the `queryId` of the query you want to cancel. + +```graphql +mutation { + cancelAsyncQuery(queryId: "YOUR_QUERY_ID") { + queryToken + accepted + rejectionCause + } +} +```