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

Hasura.RQL.DDL.Webhook.Transform.Headers

Synopsis

Documentation

newtype Headers Source #

The actual header data we are transforming..

This newtype is necessary because otherwise we end up with an orphan instance.

Constructors

Headers [Header] 

Instances

Instances details
Transform Headers Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Associated Types

data TransformFn Headers Source #

Eq (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Show (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Generic (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Associated Types

type Rep (TransformFn Headers) :: Type -> Type #

NFData (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Methods

rnf :: TransformFn Headers -> () #

FromJSON (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Methods

parseJSON :: Value -> Parser (TransformFn Headers)

parseJSONList :: Value -> Parser [TransformFn Headers]

ToJSON (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Cacheable (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

newtype TransformFn Headers Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

type Rep (TransformFn Headers) Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

type Rep (TransformFn Headers) = D1 ('MetaData "TransformFn" "Hasura.RQL.DDL.Webhook.Transform.Headers" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "HeadersTransformFn_" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HeadersTransformFn)))

newtype HeadersTransformFn Source #

The defunctionalized transformation on Headers

Constructors

AddReplaceOrRemove AddReplaceOrRemoveFields

Add or replace matching Headers.

Instances

Instances details
Eq HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Show HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Generic HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Associated Types

type Rep HeadersTransformFn :: Type -> Type #

NFData HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Methods

rnf :: HeadersTransformFn -> () #

FromJSON HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Methods

parseJSON :: Value -> Parser HeadersTransformFn

parseJSONList :: Value -> Parser [HeadersTransformFn]

ToJSON HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Cacheable HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

type Rep HeadersTransformFn Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

type Rep HeadersTransformFn = D1 ('MetaData "HeadersTransformFn" "Hasura.RQL.DDL.Webhook.Transform.Headers" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "AddReplaceOrRemove" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AddReplaceOrRemoveFields)))

data AddReplaceOrRemoveFields Source #

The user can supply a set of header keys to be filtered from the request and a set of headers to be added to the request.

Constructors

AddReplaceOrRemoveFields 

Fields

  • addOrReplaceHeaders :: [(CI Text, UnescapedTemplate)]

    A list of key-value pairs for Headers which should be added (if they don't exist) or replaced (if they do) within the HTTP message.

  • removeHeaders :: [CI Text]

    A list of Header keys which should be removed from the HTTP message.

Instances

Instances details
Eq AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Ord AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Show AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Generic AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Associated Types

type Rep AddReplaceOrRemoveFields :: Type -> Type #

NFData AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

FromJSON AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Methods

parseJSON :: Value -> Parser AddReplaceOrRemoveFields

parseJSONList :: Value -> Parser [AddReplaceOrRemoveFields]

ToJSON AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

Cacheable AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

type Rep AddReplaceOrRemoveFields Source # 
Instance details

Defined in Hasura.RQL.DDL.Webhook.Transform.Headers

type Rep AddReplaceOrRemoveFields = D1 ('MetaData "AddReplaceOrRemoveFields" "Hasura.RQL.DDL.Webhook.Transform.Headers" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "AddReplaceOrRemoveFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "addOrReplaceHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(CI Text, UnescapedTemplate)]) :*: S1 ('MetaSel ('Just "removeHeaders") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [CI Text])))

applyHeadersTransformFn :: MonadError TransformErrorBundle m => HeadersTransformFn -> RequestTransformCtx -> Headers -> m Headers Source #

Provide an implementation for the transformations defined by HeadersTransformFn.

If one views HeadersTransformFn as an interface describing HTTP message header transformations, this can be seen as an implementation of these transformations as normal Haskell functions.

validateHeadersTransformFn :: TemplatingEngine -> HeadersTransformFn -> Validation TransformErrorBundle () Source #

Validate that the provided HeadersTransformFn is correct in the context of a particular TemplatingEngine.

This is a product of the fact that the correctness of a given transformation may be dependent on zero, one, or more of the templated transformations encoded within the given HeadersTransformFn.

newtype HeaderKey Source #

This newtype exists solely to anchor a FromJSON instance and is eliminated in the TransformHeaders FromJSON instance.

Constructors

HeaderKey 

Fields