Skip to main content

Module graphql

Module graphql 

Source
Expand description

GraphQL over HTTP (GraphQL-over-HTTP draft) on hyper. Rust owns request parsing, media-type negotiation, validation against the schema, introspection and execution; the handler owns the data behind every query and mutation.

Modules§

actions
engine
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.
ws
GraphQL over WebSocket, graphql-transport-ws (the graphql-ws protocol): connection init/ack, ping/pong, subscribe/next/error/complete, with the protocol’s close codes. Rust owns the lifecycle, ids and execution; the handler supplies each subscription’s events, either in its first answer or later through the connection’s peer handle.

Enums§

Media

Constants§

DEFAULT_ENDPOINT
DEFAULT_INTROSPECTION
DEFAULT_SCHEMA
GRAPHQL_RESPONSE

Functions§

negotiate
Pick the response media type from Accept: no header means application/json (the spec’s legacy rule); otherwise the acceptable type with the highest q, an exact type beating a wildcard, and None (406) when neither type is acceptable.
spawn