Skip to main content

Crate postrust_server

Crate postrust_server 

Source
Expand description

Postrust Server library.

This crate provides the HTTP server implementation for Postrust.

§Features

  • graphql - Serves the GraphQL API at /v1/graphql, with Hasura’s contract, subscriptions and Apollo Federation.
  • admin-ui - Implies graphql, and enables the admin UI with OpenAPI documentation, Swagger UI, Scalar, and GraphQL Playground at /admin.
  • otel - OpenTelemetry: traces and metrics exported over OTLP, and the metrics as Prometheus text at /metrics on the admin port. Inactive until configured; see [otel] and docs/observability.md.

Re-exports§

pub use app::handle_request;
pub use build::build;
pub use build::App;
pub use build::Builder;
pub use build::Host;
pub use build::RESERVED_PREFIXES;
pub use state::AppState;
pub use state::TxOptions;

Modules§

app
Request handling: the axum side of the REST API.
build
Building the application a host serves.
custom
The built-in routes under /_: health and readiness.
lenient_uri
Accepting the request targets PostgREST clients actually send.
state
Application state.
telemetry
A span for every request, and the identifiers that tie its log lines together.

Structs§

Error
A failure answered as the REST API would answer it.
User
Who a request to a route of your own is, authenticated as REST does.