Expand description
mockql-core provides the building blocks behind mockql.
It analyzes GraphQL operations for @mock directives, builds provider prompts,
optionally executes upstream GraphQL requests, and merges partial mock responses
back into standard GraphQL Response.
Structs§
- Claude
CliProvider - Anthropic Claude CLI provider.
- Codex
CliProvider - OpenAI Codex CLI provider.
- Gemini
Compatible Http Provider - Gemini Compatible Endpoint HTTP provider.
- Github
Copilot Http Provider - GitHub Copilot HTTP provider.
- GraphQL
Request - A standard GraphQL JSON request.
- GraphQL
Response - A standard GraphQL JSON response.
- Mock
Response Prompt - Prompt payload sent to a mock provider.
- Mock
Service - Plans and executes GraphQL operations that may contain
@mockdirectives. - Mock
Service Request - Inputs required to fully execute a request.
- Open
Code CliProvider - Anomaly OpenCode CLI provider.
- Response
Merger - Merges two [
MergeableResponse] objects that have disjoint non-object keys. - Schema
Filter - Filters a schema down to the types and fields referenced by an operation.
- Schema
Types - The set of filtered types required to describe an operation.
Enums§
- CliProvider
- Supported local CLI providers.
- Http
Provider - Supported HTTP provider variants.
- Introspection
Error - Errors raised while resolving a schema through GraphQL introspection.
- Mock
Plan - Execution strategy selected for a request after planning.
- Provider
Config - Supported provider transport configurations.
- Provider
Error - Errors raised while serializing prompts or invoking mock providers.
- Response
Merger Error - Errors raised while merging partial GraphQL responses.
- Response
Validation Error - Errors raised while preparing or validating generated response data.
- Schema
Filter Error - Errors raised while collecting the schema subset needed by an operation.
- Schema
Load Error - Errors raised while resolving the active GraphQL schema.
- Serialization
Format - Output format used when serializing structured prompt sections.
- Service
Error - Errors raised while planning or executing a request.
- Split
Error - Errors raised while analyzing how an operation should be split.
- Upstream
Error - Errors raised while building or executing upstream GraphQL requests.
Constants§
- DEBUG_
KEY - Nested debug key stored inside
MOCK_RESPONSE_EXTENSION_KEY. - MOCK_
RESPONSE_ EXTENSION_ KEY - Extension key used to store mock-response metadata.
- REASONING_
KEY - Key used to store model reasoning for a generated response.
- SCHEMA_
EXTENSION_ KEY - Key used to carry a schema extension payload in GraphQL extensions.
Traits§
- Minify
Ext - Converts schema types into the compact prompt format used by
mockql.
Functions§
- generate_
mock_ response - Dispatches a mock response prompt to a provider.
- load_
schema - Loads a validated schema from a local SDL file or from introspection.
- to_
schema_ with_ mock_ directive - Parses and validates schema SDL, injecting the built-in
@mockdirective when absent.
Type Aliases§
- Header
- A typed HTTP header pair.