Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- validateRequestTransform :: MonadError QErr m => RequestTransform -> m RequestTransform
- newtype Unvalidated a = Unvalidated {
- _unUnvalidate :: a
- unUnvalidate :: Lens' (Unvalidated a) a
- newtype Unvalidated1 (f :: k -> Type) (a :: k) = Unvalidated1 {
- _unUnvalidate1 :: f a
- unUnvalidate1 :: Lens' (Unvalidated1 f a) (f a)
- validateTransforms :: MonadError QErr m => LensLike m api api RequestTransform RequestTransform -> LensLike m api api MetadataResponseTransform MetadataResponseTransform -> (api -> m EncJSON) -> api -> m EncJSON
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.
Unvalidated | |
|
Instances
FromJSON a => FromJSON (Unvalidated a) Source # | |
Defined in Hasura.RQL.DDL.Webhook.Transform.Validation parseJSON :: Value -> Parser (Unvalidated a) Source # parseJSONList :: Value -> Parser [Unvalidated a] Source # | |
ToJSON a => ToJSON (Unvalidated a) Source # | |
Defined in Hasura.RQL.DDL.Webhook.Transform.Validation toJSON :: Unvalidated a -> Value Source # toEncoding :: Unvalidated a -> Encoding Source # toJSONList :: [Unvalidated a] -> Value Source # toEncodingList :: [Unvalidated a] -> Encoding Source # |
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
.
Unvalidated1 | |
|
Instances
FromJSON (f a) => FromJSON (Unvalidated1 f a) Source # | |
Defined in Hasura.RQL.DDL.Webhook.Transform.Validation parseJSON :: Value -> Parser (Unvalidated1 f a) Source # parseJSONList :: Value -> Parser [Unvalidated1 f a] Source # | |
ToJSON (f a) => ToJSON (Unvalidated1 f a) Source # | |
Defined in Hasura.RQL.DDL.Webhook.Transform.Validation toJSON :: Unvalidated1 f a -> Value Source # toEncoding :: Unvalidated1 f a -> Encoding Source # toJSONList :: [Unvalidated1 f a] -> Value Source # toEncodingList :: [Unvalidated1 f a] -> Encoding Source # |
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.