Skip to content

Latest commit

 

History

History
163 lines (116 loc) · 2.5 KB

mutation.rst

File metadata and controls

163 lines (116 loc) · 2.5 KB

Mutation Reference

Table of Contents

Mutations

insert

mutation [<mutation-name>] { insert<object-name> ( objects: [object!]! on_conflict: on-conflict-input ) mutation-response }

insert_one

mutation [<mutation-name>] {
insert<object-name>_one (

object: object on_conflict: on-conflict-input

) object

}

update

mutation [<mutation-name>] {
update<object-name> (

where: bool-exp, _set: set-input, _inc: inc-input,

) mutation-response

}

update_by_pk

mutation [<mutation-name>] {
update<object-name>_by_pk (

pk_columns: pk-columns-input!, _set: set-input _inc: inc-input

) object

}

delete

mutation [<mutation-name>] {
delete<object-name> (

where: bool-exp

) mutation-response

}

delete_by_pk

mutation [<mutation-name>] {
delete<object-name>_by_pk (

key_column: value!

) object

}

Common Types

object

type <object-name> {

field1: value1, field2: value2,

}

mutation_response

type <object-name>_mutation_response {

affected_rows: Int! returning: [object!]!

}

Arguments

on_conflict_input

type <object-name>_on_conflict {

merge: Boolean!

}

pk_columns_input

type <object-name>_pk_columns_input {

key-column: column-type

}

set_input

type <object-name>_set_input {

field1: field1-type field2: field2-type

}

inc_input

type <object-name>_inc_input {

num-field1: num-field1-type num-field2: num-field2-type

}