Skip to main content

Crate vantage_api_client

Crate vantage_api_client 

Source
Expand description

Vantage adapters for HTTP-based API backends.

Two protocol adapters live side by side:

  • rest — generic REST API client. Maps Table<RestApi, E> to GET {base_url}/{table_name} with eq-conditions and pagination peeled into the URL query string.
  • graphql — GraphQL API client. Renders typed query documents with inline filters + variable-typed pagination, supports both Hasura and flat-argument (e.g. SpaceX) dialects, and bridges into Vista via a YAML schema map.

See prelude for a one-stop import.

Re-exports§

pub use graphql::AnyGraphqlType;
pub use graphql::FieldCondition;
pub use graphql::FilterDialect;
pub use graphql::GraphqlApi;
pub use graphql::GraphqlApiBuilder;
pub use graphql::GraphqlApiTableShell;
pub use graphql::GraphqlApiVistaFactory;
pub use graphql::GraphqlApiVistaSpec;
pub use graphql::GraphqlBlock;
pub use graphql::GraphqlColumnBlock;
pub use graphql::GraphqlColumnExtras;
pub use graphql::GraphqlCondition;
pub use graphql::GraphqlOp;
pub use graphql::GraphqlOperation;
pub use graphql::GraphqlSelect;
pub use graphql::GraphqlTableExtras;
pub use graphql::GraphqlType;
pub use graphql::GraphqlTypeVariants;
pub use graphql::NoGraphqlExtras;
pub use graphql::RenderedQuery;
pub use rest::ApiColumnExtras;
pub use rest::ApiReferenceExtras;
pub use rest::ApiTableBlock;
pub use rest::ApiTableExtras;
pub use rest::FilterStrategy;
pub use rest::ModelResolver;
pub use rest::NoApiExtras;
pub use rest::OrderingParams;
pub use rest::PaginationParams;
pub use rest::ResponseShape;
pub use rest::RestApi;
pub use rest::RestApiBuilder;
pub use rest::RestApiTableShell;
pub use rest::RestApiVistaFactory;
pub use rest::RestApiVistaSpec;
pub use rest::eq_condition;

Modules§

graphql
GraphQL adapter for Vantage.
prelude
Convenience prelude — use vantage_api_client::prelude::*; pulls in the public surface of both adapter modules in one shot.
rest
REST API adapter for Vantage.

Structs§

CallPolicy
The policy for one call.
ClientError
ResilientClient
A cheap-to-clone resilient HTTP client. Build via ResilientClient::builder.

Enums§

BreakerMode
What an attempt does while the circuit breaker is open.
BreakerState
What a ResilientClient’s breaker is doing right now, for consumers that poll instead of tracking TransportEvents.
ErrorKind
Priority
Whether someone is waiting on the result of the request about to be sent. Transports choose their retry policy from it.
RetryMode
How many times, and how long apart, a failed attempt is repeated.
TransportEvent

Traits§

TransportObserver