graphql-engine/server/test/testcases/insert_mutation_article_on_conflict.yaml
Rakesh Emmadi 5efa366b49 add 'on_conflict' argument to insert mutation (closes #105)
* add 'on_conflict' condition to allow upsert mutation, closes #105

* check for empty unique or primary key constraints

* add 'on_conflict' condition test cases and introspection test case

* update 'conflict_action' enum values' description
2018-07-17 18:53:23 +05:30

29 lines
566 B
YAML

description: Upserts article data via GraphQL mutation
url: /v1alpha1/graphql
status: 200
query:
query: |
mutation insert_article {
insert_article (
objects: [
{
content: "Updated Article 1 content",
id: 1
},
{
content: "Updated Article 2 content",
id: 2
}
],
on_conflict: {
constraint: article_pkey,
action: update
}
) {
returning {
title
content
}
}
}