graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Backends.BigQuery.Connection

Synopsis

Documentation

newtype Scope Source #

Constructors

Scope 

Fields

data TokenProblem Source #

Constructors

BearerTokenDecodeProblem UnicodeException 
BearerTokenSignsaferProblem Error 
TokenFetchProblem JSONException 
TokenRequestNonOK Status 

getUsableToken :: MonadIO m => BigQueryConnection -> m (Either TokenProblem TokenResp) Source #

Get a usable token. If the token has expired refresh it.

withGoogleApiRetries :: MonadIO m => RetryOptions -> m (Response body) -> m (Response body) Source #

Uses up to specified number retries for Google API requests with the specified base delay, uses full jitter backoff, see https://aws.amazon.com/ru/blogs/architecture/exponential-backoff-and-jitter/ HTTP statuses for transient errors were taken from https://github.com/googleapis/python-api-core/blob/34ebdcc251d4f3d7d496e8e0b78847645a06650b/google/api_core/retry.py#L112-L115