Crate prima_bridge
source · [−]Expand description
This crate gives an high level api to execute external request.
It is supposed to give the basics building blocks for building bridges to other services while abstracting the low level stuffs like adding custom headers and request tracing.
Right now it supports Rest and GraphQL requests.
You should start by creating a Bridge instance. This instance should live for all the application lifetime.
Do not create a new bridge on every request!
You should use something like once_cell or lazy_static, or some sort of inversion of control container to pass around.
The bridge implement a type state pattern to build the external request.
Modules
Structs
The bridge instance to issue external requests.
A builder for creating Bridge instances
A struct representing a graphql error see: https://spec.graphql.org/June2018/#sec-Errors
The GraphQLRequest is a struct that represent a GraphQL request to be done with the Bridge
A server request
A server response
Enums
An error type to represent all possible outcome for a graphql response deserialization
Traits
Type Definitions
A type returned from parse_graphql_response function useful for getting full control of a GraphQL response