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

Hasura.Backends.Postgres.Execute.Mutation

Description

Postgres Execute Mutation

Generic combinators for translating and excecuting IR mutation statements. Used by the specific mutation modules, e.g. Insert.

See Execute.

Synopsis

Documentation

data MutateResp (b :: BackendType) a Source #

Instances

Instances details
(Backend b, FromJSON a) => FromJSON (MutateResp b a) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Mutation

(Backend b, ToJSON a) => ToJSON (MutateResp b a) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Mutation

Generic (MutateResp b a) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Mutation

Associated Types

type Rep (MutateResp b a) :: Type -> Type #

Methods

from :: MutateResp b a -> Rep (MutateResp b a) x #

to :: Rep (MutateResp b a) x -> MutateResp b a #

(Backend b, Show a) => Show (MutateResp b a) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Mutation

Methods

showsPrec :: Int -> MutateResp b a -> ShowS #

show :: MutateResp b a -> String #

showList :: [MutateResp b a] -> ShowS #

(Backend b, Eq a) => Eq (MutateResp b a) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Mutation

Methods

(==) :: MutateResp b a -> MutateResp b a -> Bool #

(/=) :: MutateResp b a -> MutateResp b a -> Bool #

type Rep (MutateResp b a) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Mutation

type Rep (MutateResp b a) = D1 ('MetaData "MutateResp" "Hasura.Backends.Postgres.Execute.Mutation" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "MutateResp" 'PrefixI 'True) (S1 ('MetaSel ('Just "_mrAffectedRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "_mrReturningColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ColumnValues b a])))

executeMutationOutputQuery Source #

Arguments

:: forall pgKind m. (MonadTx m, Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind, MonadReader QueryTagsComment m) 
=> QualifiedTable 
-> [ColumnInfo ('Postgres pgKind)] 
-> Maybe Int 
-> MutationCTE 
-> MutationOutput ('Postgres pgKind) 
-> StringifyNumbers 
-> Maybe NamingCase 
-> [PrepArg]

Prepared params

-> m EncJSON 

type InsertValidationPayloadMap pgKind = InsOrdHashMap (TableName ('Postgres pgKind)) ([AnnotatedInsertRow ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind))], ValidateInput ResolvedWebhook) Source #

Map of table name and the value that is being inserted for that table This map is helpful for collecting all the insert mutation arguments for the nested tables and then sending them all at onve to the input validation webhook.