swh.graphql.server module#

swh.graphql.server.get_storage() StorageInterface[source]#
swh.graphql.server.get_config() Dict[str, Any][source]#
class swh.graphql.server.AnonymousAuthBackend[source]#

Bases: AuthenticationBackend

async authenticate(conn)[source]#
swh.graphql.server.load_and_check_config(config_path: str | None) Dict[str, Any][source]#
Check the minimal configuration is set to run the api or raise an

error explanation.

Parameters:

config_path – Path to the configuration file to load

Raises:

Error if the setup is not as expected

Returns:

configuration as a dict

swh.graphql.server.make_app_from_configfile()[source]#

Loading the configuration from a configuration file.

SWH_CONFIG_FILENAME environment variable defines the configuration path to load.