# pactQuery **Type:** GraphQL queries **Description:** Execute arbitrary Pact code via a local call without requiring gas estimation or signature verification. The `pactQuery` query allows you to run read-only Pact code directly against the Kadena blockchain, such as arithmetic expressions or contract read functions (e.g., `(coin.get-details "")`). It does **not** create a transaction or modify chain state — it simply executes the code locally and returns the result. This is ideal for use cases like: - Retrieving token or account details without submitting a transaction. - Running lightweight Pact expressions or view functions. - Building dashboards or explorers that query contract state in real time. Multiple queries can be sent in a single request by providing an array of `PactQuery` objects. ## Arguments - pactQuery (PactQuery, Not Null): A list of Pact queries to execute. Each query specifies the `chainId`, `code`, and optional input `data`. - chainId (String): The ID of the chain on which the Pact code should be executed. - code (String): The Pact code to execute. Examples: - `"(+ 1 2)"` - `"(coin.get-details \\\"k:abcdef123456...\\\")"` - data (PactQueryData): Optional arguments or environment data for the Pact code execution. Typically used to pass variables or structured input required by the smart contract. - key (String) - value (String) ## Response **Type:** PactQueryResponse **Description:** The result of executing a Pact query via a local call. Each `PactQueryResponse` corresponds to one `PactQuery` input and contains the execution result, status, and any error message returned by the Pact interpreter. ### Fields - chainId (String): The chain ID on which the query was executed. - code (String): The original Pact code that was executed. - error (String): Any error message returned during execution. `null` if the query was successful. - result (String): The raw JSON-encoded result returned by the Pact execution. - status (String): The execution status, typically `"success"` or `"failure"`.