Skip to main content

Module engine

Module engine 

Source
Expand description

GraphQL documents, schema, introspection and execution on apollo-compiler. Rust parses and validates every request against the configured SDL, answers introspection itself and runs the spec’s execution (result coercion, null propagation, error paths) over the data the handler supplies, so the response always matches the query that was asked.

Structs§

Prepared
A parsed, validated request ready to execute.
RequestErrors
A request error: no data key, a list of errors with locations where known.

Constants§

CLIENT_INTROSPECTION
Introspection the client runs on connect: root types and their fields with argument and return types, enough for a handler to know what it can ask.
MAX_BODY_BYTES
MAX_QUERY_BYTES
MAX_SCHEMA_BYTES
RECURSION_LIMIT
Parser nesting bound: selection sets, lists and input objects all count toward it.
TOKEN_LIMIT

Functions§

ast_to_json
budget_ok
check_response
A GraphQL response body as the client sees it: data and/or errors, each well formed.
handler_errors
Handler errors appended to the response: message required, path optional (strings and non-negative integers), extensions optional.
load_schema
operation_type_name
parse_operation
Syntax-only parse for the client: operation type and name of the selected operation.
prepare
Parse, validate, pick the operation and coerce variables — every request error in the spec’s order (parse → validate → operation → variables).
root_signatures
Summarise an introspection answer as root-field signatures (book(id: ID!): Book).