GraphQL layer

Single-spec execute runs OpenAPI→GraphQL in the same process as clawql-mcp / clawql-mcp-http, so responses can be field-projected before they reach the model—smaller payloads than many raw REST bodies. Streamable HTTP also exposes /graphql on the MCP port for debugging.

Same process as MCP

search and execute share one runtime. execute builds the GraphQL schema from the loaded spec, resolves the operation field, and proxies to upstream REST with @omnigraph/openapi (same engine as GraphQL Mesh OpenAPI). Upstream calls use spec servers or CLAWQL_API_BASE_URL.

Multi-spec and fallback

  • Merged specs: execute uses REST per owning document; GraphQL is not the execution path for that mode today.
  • Single spec: GraphQL is preferred when the schema builds; on translation or runtime errors, execute falls back to REST with the same operation map.

Pregenerated introspection.json (bundled or CLAWQL_INTROSPECTION_PATH) speeds field matching at MCP startup.

Was this page helpful?