graphql-engine/server/src-test/Test/Autodocodec/Extended.hs
David Overton 44577dab1b Add ToSchema instances to GDW API types
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4006
Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com>
GitOrigin-RevId: 756ca0ed60865d0eb675562e8959f0d1839f9abe
2022-03-31 04:46:08 +00:00

22 lines
615 B
Haskell

module Test.Autodocodec.Extended (genValueWrapper, genValueWrapper2, genValueWrapper3) where
import Autodocodec.Extended
import Hasura.Prelude
import Hedgehog (MonadGen)
genValueWrapper :: MonadGen m => m a -> m (ValueWrapper t a)
genValueWrapper = fmap ValueWrapper
genValueWrapper2 :: MonadGen m => m a1 -> m a2 -> m (ValueWrapper2 t1 a1 t2 a2)
genValueWrapper2 genA1 genA2 =
ValueWrapper2
<$> genA1
<*> genA2
genValueWrapper3 :: MonadGen m => m a1 -> m a2 -> m a3 -> m (ValueWrapper3 t1 a1 t2 a2 t3 a3)
genValueWrapper3 genA1 genA2 genA3 =
ValueWrapper3
<$> genA1
<*> genA2
<*> genA3