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

Hasura.Backends.DataConnector.Plan.Common

Description

This module contains Data Connector request/response planning code and utility functions and types that are common across the different categories of requests (ie queries, mutations, etc). It contains code and concepts that are independent of these different categories.

Both QueryPlan and MutationPlan use the contents of this module, for example mkQueryPlan.

Synopsis

Documentation

data Plan request response Source #

Represents a request to be sent to a data connector agent (_pRequest) and a function that is capable of reshaping the response to that request into the final JSON form expected to be returned by the GraphQL endpoint (_pResponseReshaper).

Constructors

Plan 

Fields

data TableRelationshipsKey Source #

Key datatype for TableRelationships to avoid having an Either directly as the key, and make extending the types of relationships easier in future.

Instances

Instances details
Generic TableRelationshipsKey Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Plan.Common

Associated Types

type Rep TableRelationshipsKey :: Type -> Type #

Show TableRelationshipsKey Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Plan.Common

Eq TableRelationshipsKey Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Plan.Common

Hashable TableRelationshipsKey Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Plan.Common

type Rep TableRelationshipsKey Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Plan.Common

type Rep TableRelationshipsKey = D1 ('MetaData "TableRelationshipsKey" "Hasura.Backends.DataConnector.Plan.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FunctionNameKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FunctionName)) :+: C1 ('MetaCons "TableNameKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TableName)))

recordTableRelationship :: (Has TableRelationships writerOutput, Monoid writerOutput, MonadError QErr m) => TableRelationshipsKey -> RelationshipName -> Relationship -> WriterT writerOutput m () Source #

Records a table relationship encountered during request translation into the output of the current WriterT

data FieldPrefix Source #

Represents a potential prefix that can be applied to a field name, useful for namespacing field names that may be otherwise duplicated.

data Cardinality Source #

Constructors

Single 
Many