| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hasura.Server.API.Backend
Description
BackendAPI
This module defines the BackendAPI class, alongside a few helpers. Its goal is to delegate to
backends the responsibility of creating the parsers for the metadata API. Each backend is expected
to provide a list of CommandParser, which in turn is a simple function from command name and
command arguments to a corresponding parser. Command parsers can easily be created using the
commandParser function.
Furthermore, for each set of related features, such as table tracking commands, or permission commands, a helper function is provided, that allows a backend to write its instance by simply listing the set of features it supports.
Documentation
type CommandParser b = BackendSourceKind b -> Text -> Value -> Parser (Maybe RQLMetadataV1) Source #
class BackendAPI (b :: BackendType) where Source #
Methods
Instances
| BackendAPI 'MSSQL Source # | |
Defined in Hasura.Backends.MSSQL.Instances.API Methods | |
| BackendAPI 'BigQuery Source # | |
Defined in Hasura.Backends.BigQuery.Instances.API Methods metadataV1CommandParsers :: [CommandParser 'BigQuery] Source # | |
| BackendAPI 'MySQL Source # | |
Defined in Hasura.Backends.MySQL.Instances.API Methods | |
| BackendAPI 'DataConnector Source # | |
Defined in Hasura.Backends.DataConnector.Adapter.API Methods metadataV1CommandParsers :: [CommandParser 'DataConnector] Source # | |
| BackendAPI ('Postgres 'Vanilla) Source # | |
Defined in Hasura.Backends.Postgres.Instances.API Methods metadataV1CommandParsers :: [CommandParser ('Postgres 'Vanilla)] Source # | |
| BackendAPI ('Postgres 'Citus) Source # | |
Defined in Hasura.Backends.Postgres.Instances.API Methods metadataV1CommandParsers :: [CommandParser ('Postgres 'Citus)] Source # | |
| BackendAPI ('Postgres 'Cockroach) Source # | |
Defined in Hasura.Backends.Postgres.Instances.API Methods metadataV1CommandParsers :: [CommandParser ('Postgres 'Cockroach)] Source # | |
commandParserWithExplicitParser Source #
Arguments
| :: (BackendSourceKind b -> Value -> Parser a) | Explicit parsing function that also takes a BackendKind |
| -> Text | expected command name |
| -> (a -> RQLMetadataV1) | corresponding parser |
| -> CommandParser b |
Arguments
| :: FromJSON a | |
| => Text | expected command name |
| -> (a -> RQLMetadataV1) | corresponding parser |
| -> CommandParser b |
commandParserWithBackendKind Source #
Arguments
| :: FromJSONWithContext (BackendSourceKind b) a | |
| => Text | expected command name |
| -> (a -> RQLMetadataV1) | corresponding parser |
| -> CommandParser b |
sourceCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
tableCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
tablePermissionsCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
functionCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
functionPermissionsCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
relationshipCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
remoteRelationshipCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
eventTriggerCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #
computedFieldCommands :: forall (b :: BackendType). Backend b => [CommandParser b] Source #