pub async fn graphql_handler<A: DatabaseAdapter + Clone + Send + Sync + 'static>(
__arg0: State<AppState<A>>,
headers: HeaderMap,
__arg2: OptionalSecurityContext,
__arg3: Json<GraphQLRequest>,
) -> Result<GraphQLResponse, ErrorResponse>Expand description
GraphQL HTTP handler for POST requests.
Handles POST requests to the GraphQL endpoint:
- Extract W3C trace context from traceparent header (if present)
- Validate GraphQL request (depth, complexity)
- Parse GraphQL request body
- Execute query via Executor with optional
SecurityContext - Return GraphQL response with proper error formatting
Tracks execution timing and operation name for monitoring. Provides GraphQL spec-compliant error responses. Supports W3C Trace Context for distributed tracing. Supports OIDC authentication for RLS policy evaluation.
ยงErrors
Returns appropriate HTTP status codes based on error type.