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

Hasura.RQL.DDL.Webhook.Transform.Validation

Description

We validate TransformFn terms inside RequestTransform before dispatching Metadata actions in runMetadataQueryV1M. Validation follows the same HKD pattern from applyRequestTransform but using btraverseC to call validate from the Transform class on all the HKD fields.

Synopsis

Documentation

validateRequestTransform :: MonadError QErr m => RequestTransform -> m RequestTransform Source #

Validate all 'TransformFn a' fields in the RequestTransform.

newtype Unvalidated a Source #

Used to annotate that a RequestTransform, or some record containing a RequestTransform has not yet been validated.

Constructors

Unvalidated 

Fields

unUnvalidate :: Lens' (Unvalidated a) a Source #

A lens for focusing through Unvalidated in validateTransforms.

newtype Unvalidated1 (f :: k -> Type) (a :: k) Source #

Used to annotate that a higher kinded type containing a RequestTransform has not yet been validated.

This is needed specifically for CreateEventTriggerQuery and any other type that is paramterized by a BackendType.

Constructors

Unvalidated1 

Fields

unUnvalidate1 :: Lens' (Unvalidated1 f a) (f a) Source #

A lens for focusing through Unvalidated1 in validateTransforms.

validateTransforms :: MonadError QErr m => LensLike m api api RequestTransform RequestTransform -> LensLike m api api MetadataResponseTransform MetadataResponseTransform -> (api -> m EncJSON) -> api -> m EncJSON Source #

Used to focus into a records in RQLMetadataV1 and validate any RequestTransform terms present.