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

Hasura.RQL.DDL.Webhook.Transform.Url

Synopsis

Documentation

newtype Url Source #

The actual URL string we are transforming.

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

Constructors

Url 

Fields

Instances

Instances details
Eq Url Source # 
Instance details

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

Methods

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

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

Show Url Source # 
Instance details

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

Methods

showsPrec :: Int -> Url -> ShowS #

show :: Url -> String #

showList :: [Url] -> ShowS #

Transform Url Source # 
Instance details

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

Associated Types

data TransformFn Url Source #

Eq (TransformFn Url) Source # 
Instance details

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

Show (TransformFn Url) Source # 
Instance details

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

Generic (TransformFn Url) Source # 
Instance details

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

Associated Types

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

NFData (TransformFn Url) Source # 
Instance details

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

Methods

rnf :: TransformFn Url -> () #

FromJSON (TransformFn Url) Source # 
Instance details

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

Methods

parseJSON :: Value -> Parser (TransformFn Url)

parseJSONList :: Value -> Parser [TransformFn Url]

ToJSON (TransformFn Url) Source # 
Instance details

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

Methods

toJSON :: TransformFn Url -> Value

toEncoding :: TransformFn Url -> Encoding

toJSONList :: [TransformFn Url] -> Value

toEncodingList :: [TransformFn Url] -> Encoding

Cacheable (TransformFn Url) Source # 
Instance details

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

newtype TransformFn Url Source # 
Instance details

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

type Rep (TransformFn Url) Source # 
Instance details

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

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

newtype UrlTransformFn Source #

The defunctionalized transformation function on Url

Instances

Instances details
Eq UrlTransformFn Source # 
Instance details

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

Show UrlTransformFn Source # 
Instance details

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

Generic UrlTransformFn Source # 
Instance details

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

Associated Types

type Rep UrlTransformFn :: Type -> Type #

NFData UrlTransformFn Source # 
Instance details

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

Methods

rnf :: UrlTransformFn -> () #

FromJSON UrlTransformFn Source # 
Instance details

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

Methods

parseJSON :: Value -> Parser UrlTransformFn

parseJSONList :: Value -> Parser [UrlTransformFn]

ToJSON UrlTransformFn Source # 
Instance details

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

Methods

toJSON :: UrlTransformFn -> Value

toEncoding :: UrlTransformFn -> Encoding

toJSONList :: [UrlTransformFn] -> Value

toEncodingList :: [UrlTransformFn] -> Encoding

Cacheable UrlTransformFn Source # 
Instance details

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

type Rep UrlTransformFn Source # 
Instance details

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

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

applyUrlTransformFn :: MonadError TransformErrorBundle m => UrlTransformFn -> RequestTransformCtx -> Url -> m Url Source #

Provide an implementation for the transformations defined by UrlTransformFn.

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

validateUrlTransformFn :: TemplatingEngine -> UrlTransformFn -> Validation TransformErrorBundle () Source #

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