mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
71ae144aa6
GitOrigin-RevId: 404f8bbdefb8a99b31fac75e4253daad81c8af90
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
- description: Insert a value into the table.
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
data:
|
|
insert_author_one:
|
|
name: "Rick Astley"
|
|
query:
|
|
query: |
|
|
mutation {
|
|
insert_author_one(object: {id: 1, name: "Rick Astley"}) {
|
|
name
|
|
}
|
|
}
|
|
|
|
- description: Send one valid mutation followed by an erroneous one.
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
errors:
|
|
- extensions:
|
|
path: $.selectionSet.insert_author_one.args.object
|
|
code: constraint-violation
|
|
message: Uniqueness violation. duplicate key value violates unique constraint
|
|
"author_pkey"
|
|
query:
|
|
query: |
|
|
mutation {
|
|
insert_author(objects: {id: 2, name: "Eduard Anatolyevich Khil"}) {
|
|
returning {
|
|
name
|
|
}
|
|
}
|
|
insert_author_one(object: {id: 1, name: "Rick Astley"}) {
|
|
name
|
|
}
|
|
}
|
|
|
|
- description: Check that the first mutation was reverted.
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
data:
|
|
author:
|
|
- name: "Rick Astley"
|
|
query:
|
|
query: |
|
|
query {
|
|
author {
|
|
name
|
|
}
|
|
}
|