You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(api): add saved_query GraphQL field for the curated saved-query library (#7642) (#7652)
Add saved_query(id: String!, params: JSON): JSON to type Query, mirroring
GET /api/v1/queries/{id} and the run_saved_query MCP tool by calling the same
shared executor (src/saved-queries.mjs runSavedQuery) -- template lookup,
param coercion/validation, and execution are all its; nothing re-implemented.
Unknown id and invalid params (its not_found / invalid_params toolErrors) map
to BAD_USER_INPUT, matching the file's invalid-argument convention; any other
executor failure surfaces as a normal GraphQL error. Opaque
{query_id, params, data} JSON passthrough per the registry_summary-family
convention, RELATIONSHIP_FIELD_COMPLEXITY weight, and tests (template run
with a params object literal, unknown id listing valid ids, unknown param,
complexity).
"The discovered candidate-surface ledger: every machine-discovered surface awaiting review, with its subnet (netuid), kind, provider, and review state. Filter by netuid/kind/provider/state and page with limit/cursor, exactly like the REST route. Resolves to {items,total,next_cursor} as opaque JSON. Mirrors GET /api/v1/candidates."
"Run one maintainer-curated saved-query template by id, with its template-defined params object -- the same parameterized query library REST and the run_saved_query MCP tool execute. Resolves to {query_id, params, data} as opaque JSON. An unknown id or invalid params is a BAD_USER_INPUT error listing the valid template ids, not a silently substituted default. Mirrors GET /api/v1/queries/{id}."
511
+
saved_query(id: String!, params: JSON): JSON
507
512
"The recorded response fixtures for registered surfaces, used to replay/verify a surface without calling it. Null when no fixture index has been baked in this environment. Opaque JSON passed through verbatim, matching the list_fixtures MCP/REST shape. Mirrors GET /api/v1/fixtures."
508
513
fixtures: JSON
509
514
"The agent-callable service catalog: without a netuid, the global index of subnets exposing callable services; with one, that subnet's full per-service catalog. Both are overlaid with live health exactly as REST composes them. Null when the catalog has not been baked. Opaque JSON, matching the get_agent_catalog MCP/REST shape. Mirrors GET /api/v1/agent-catalog."
0 commit comments