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

Hasura.RQL.DDL.Webhook.Transform.Method

Synopsis

Documentation

newtype Method Source #

The actual request method we are transforming.

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

Constructors

Method (CI Text) 

Instances

Instances details
Eq Method Source # 
Instance details

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

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Show Method Source # 
Instance details

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

Generic Method Source # 
Instance details

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

Associated Types

type Rep Method :: Type -> Type #

Methods

from :: Method -> Rep Method x #

to :: Rep Method x -> Method #

NFData Method Source # 
Instance details

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

Methods

rnf :: Method -> () #

FromJSON Method Source # 
Instance details

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

Methods

parseJSON :: Value -> Parser Method

parseJSONList :: Value -> Parser [Method]

ToJSON Method Source # 
Instance details

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

Methods

toJSON :: Method -> Value

toEncoding :: Method -> Encoding

toJSONList :: [Method] -> Value

toEncodingList :: [Method] -> Encoding

Cacheable Method Source # 
Instance details

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

Transform Method Source # 
Instance details

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

Associated Types

data TransformFn Method Source #

Eq (TransformFn Method) Source # 
Instance details

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

Show (TransformFn Method) Source # 
Instance details

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

Generic (TransformFn Method) Source # 
Instance details

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

Associated Types

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

NFData (TransformFn Method) Source # 
Instance details

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

Methods

rnf :: TransformFn Method -> () #

FromJSON (TransformFn Method) Source # 
Instance details

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

Methods

parseJSON :: Value -> Parser (TransformFn Method)

parseJSONList :: Value -> Parser [TransformFn Method]

ToJSON (TransformFn Method) Source # 
Instance details

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

Methods

toJSON :: TransformFn Method -> Value

toEncoding :: TransformFn Method -> Encoding

toJSONList :: [TransformFn Method] -> Value

toEncodingList :: [TransformFn Method] -> Encoding

Cacheable (TransformFn Method) Source # 
Instance details

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

type Rep Method Source # 
Instance details

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

type Rep Method = D1 ('MetaData "Method" "Hasura.RQL.DDL.Webhook.Transform.Method" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "Method" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CI Text))))
newtype TransformFn Method Source # 
Instance details

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

type Rep (TransformFn Method) Source # 
Instance details

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

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

newtype MethodTransformFn Source #

The defunctionalized transformation on Method.

Constructors

Replace Method

Replace the HTTP existing Method with a new one.

Instances

Instances details
Eq MethodTransformFn Source # 
Instance details

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

Show MethodTransformFn Source # 
Instance details

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

Generic MethodTransformFn Source # 
Instance details

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

Associated Types

type Rep MethodTransformFn :: Type -> Type #

NFData MethodTransformFn Source # 
Instance details

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

Methods

rnf :: MethodTransformFn -> () #

FromJSON MethodTransformFn Source # 
Instance details

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

Methods

parseJSON :: Value -> Parser MethodTransformFn

parseJSONList :: Value -> Parser [MethodTransformFn]

ToJSON MethodTransformFn Source # 
Instance details

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

Cacheable MethodTransformFn Source # 
Instance details

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

type Rep MethodTransformFn Source # 
Instance details

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

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

applyMethodTransformFn :: MonadError TransformErrorBundle m => MethodTransformFn -> RequestTransformCtx -> Method -> m Method Source #

Provide an implementation for the transformations defined by MethodTransformFn.

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

validateMethodTransformFn :: TemplatingEngine -> MethodTransformFn -> Validation TransformErrorBundle () Source #

Validate that the provided MethodTransformFn 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 MethodTransformFn.

XXX: Do we want to validate the HTTP method verb?