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

Hasura.Backends.Postgres.Translate.Returning

Description

Postgres Translate Returning

Combinators and helpers for dealing with GraphQL returning statements.

Synopsis

Documentation

data MutationCTE Source #

The postgres common table expression (CTE) for mutation queries. This CTE expression is used to generate mutation field output expression, see Note [Mutation output expression].

Constructors

MCCheckConstraint TopLevelCTE

A Mutation with check constraint validation (Insert or Update)

MCSelectValues Select

A Select statement which emits mutated table rows

MCDelete SQLDelete

A Delete statement

mkMutationOutputExp :: (Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind) => QualifiedTable -> [ColumnInfo ('Postgres pgKind)] -> Maybe Int -> MutationCTE -> MutationOutput ('Postgres pgKind) -> StringifyNumbers -> Maybe NamingCase -> SelectWith Source #

Generate mutation output expression with given mutation CTE statement. See Note [Mutation output expression].