graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Server.Init

Description

Arg and Env Parsing for initialisation of the engine along with corresponding logging and other helper functionality.

This module is intended as the interface for options parsing and its submodules should not need to be imported directly.

Synopsis

Documentation

getDbId :: TxE QErr MetadataDbId Source #

Query the Metadata DB for the Metadata DB UUID. TODO: Move into a dedicated Metadata module (ala Pro).

mkHGEOptions :: EnabledLogTypes impl => HGEOptionsRaw (ServeOptionsRaw impl) -> WithEnv (HGEOptions (ServeOptions impl)) Source #

Given the ServeOptionsRaw parsed from the arg parser, postprocess the db url and fetch env vars associated with the main command parser, then process the subcommand raw values if necessary.

processPostgresConnInfo :: PostgresConnInfo (Maybe PostgresConnInfoRaw) -> WithEnv (PostgresConnInfo (Maybe UrlConf)) Source #

PostressConnInfo is a a tuple of some a with a 'Maybe Int' representing the retries setting. This function thus takes a retries setting and a PostgresConnInfoRaw from the arg parser and merges those results with the contents of their corresponding env vars.

mkServeOptions :: forall impl. EnabledLogTypes impl => ServeOptionsRaw impl -> WithEnv (ServeOptions impl) Source #

Merge the results of the serve subcommmand arg parser with corresponding values from the WithEnv context.