Run a GraphQL query
query_graphqlRuns a read-only GraphQL query against an API for GraphQL item; given question instead of query, it builds the query as answer_query_draft does and runs it. Requires workspace and api, plus query, or question with tables and source. Returns JSON with the data, size-bounded, and for a question the query used. Mutations and subscriptions are refused; changes nothing. describe_backend gives the field names. Errors: {error, kind, hint}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace": "<workspace>",
"api": "<api>"
},
"name": "query_graphql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api | Yes | API for GraphQL item, name or id (list_sources: graphql_apis). | |
| query | No | GraphQL query text; mutations and subscriptions are refused. Default "" (then question is used). Example: "{ customers(first: 5) { items { customer_id name } } }". | |
| schema | No | Schema in the source. Default "dbo". | dbo |
| source | No | With question: the lakehouse or warehouse the API reads. Default: none. Example: "demo_lh". | |
| tables | No | With question: the tables it is about. Default: none. Example: ["orders", "customers"]. | |
| question | No | Instead of query: a question in Swedish or English, built into a query as answer_query_draft does and run. Default: none. Example: "orders per customer". | |
| variables | No | GraphQL variables for query. Default: none. Example: {"id": 42}. | |
| workspace | Yes | Fabric workspace, name or id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |