mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 18:42:30 +03:00
5efa366b49
* 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
29 lines
566 B
YAML
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
|
|
}
|
|
}
|
|
}
|