mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-20 22:11:45 +03:00
647231b685
Manually enables: * EmptyCase * ExistentialQuantification * QuantifiedConstraints * QuasiQuotes * TemplateHaskell * TypeFamilyDependencies ...in the following components: * 'graphql-engine' library * 'graphql-engine' 'src-test' * 'graphql-engine' 'tests/integration' * 'graphql-engine' tests-hspec' Additionally, performs some light refactoring and documentation. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3991 GitOrigin-RevId: 514477d3466b01f60eca8935d0fef60dd0756838
41 lines
1.1 KiB
Haskell
41 lines
1.1 KiB
Haskell
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Hasura.RQL.IR.Update
|
|
( AnnotatedUpdate,
|
|
AnnotatedUpdateG (..),
|
|
auTable,
|
|
auWhere,
|
|
auCheck,
|
|
auBackend,
|
|
auOutput,
|
|
auAllCols,
|
|
)
|
|
where
|
|
|
|
import Control.Lens.TH (makeLenses)
|
|
import Data.Kind (Type)
|
|
import Hasura.Prelude
|
|
import Hasura.RQL.IR.BoolExp
|
|
import Hasura.RQL.IR.Returning
|
|
import Hasura.RQL.Types.Backend
|
|
import Hasura.RQL.Types.Column
|
|
import Hasura.SQL.Backend
|
|
|
|
data AnnotatedUpdateG (b :: BackendType) (r :: Type) v = AnnotatedUpdateG
|
|
{ _auTable :: !(TableName b),
|
|
_auWhere :: !(AnnBoolExp b v, AnnBoolExp b v),
|
|
_auCheck :: !(AnnBoolExp b v),
|
|
-- | All the backend-specific data related to an update mutation
|
|
_auBackend :: BackendUpdate b v,
|
|
-- we don't prepare the arguments for returning
|
|
-- however the session variable can still be
|
|
-- converted as desired
|
|
_auOutput :: !(MutationOutputG b r v),
|
|
_auAllCols :: ![ColumnInfo b]
|
|
}
|
|
deriving (Functor, Foldable, Traversable)
|
|
|
|
type AnnotatedUpdate b = AnnotatedUpdateG b Void (SQLExpression b)
|
|
|
|
$(makeLenses ''AnnotatedUpdateG)
|