graphql-engine/server/test/testcases/insert_mutation_article.yaml
2018-07-20 13:49:06 +05:30

48 lines
1.0 KiB
YAML

description: Inserts article data via GraphQL mutation
url: /v1alpha1/graphql
status: 200
query:
query: |
mutation insert_article {
insert_article (
objects: [
{
title: "Article 1",
content: "Sample article content",
author_id: 1,
is_published: true
},
{
title: "Article 2",
content: "Sample article content",
author_id: 1,
is_published: true
},
{
title: "Article 3",
content: "Sample article content",
author_id: 2,
is_published: true
},
{
title: "Article 4",
content: "Sample article content",
author_id: 1,
is_published: false
},
{
title: "Article 5",
content: "Sample article content",
author_id: 2,
is_published: false
}
]
) {
returning {
id
title
content
}
}
}