@@ -221,6 +221,45 @@ Feature: GraphQL mutation support
221221 And the JSON node "data.updateCompositeRelation.value" should be equal to "Modified value."
222222 And the JSON node "data.updateCompositeRelation.clientMutationId" should be equal to "myId"
223223
224+ Scenario : Create an item with a custom UUID
225+ When I send the following GraphQL request:
226+ """
227+ mutation {
228+ createWritableId(input: {_id: "c6b722fe-0331-48c4-a214-f81f9f1ca082", name: "Foo", clientMutationId: "m"}) {
229+ id
230+ _id
231+ name
232+ clientMutationId
233+ }
234+ }
235+ """
236+ And the response should be in JSON
237+ And the header "Content-Type" should be equal to "application/json"
238+ And the JSON node "data.createWritableId.id" should be equal to "/writable_ids/c6b722fe-0331-48c4-a214-f81f9f1ca082"
239+ And the JSON node "data.createWritableId._id" should be equal to "c6b722fe-0331-48c4-a214-f81f9f1ca082"
240+ And the JSON node "data.createWritableId.name" should be equal to "Foo"
241+ And the JSON node "data.createWritableId.clientMutationId" should be equal to "m"
242+
243+ Scenario : Update an item with a custom UUID
244+ When I send the following GraphQL request:
245+ """
246+ mutation {
247+ updateWritableId(input: {id: "/writable_ids/c6b722fe-0331-48c4-a214-f81f9f1ca082", _id: "f8a708b2-310f-416c-9aef-b1b5719dfa47", name: "Foo", clientMutationId: "m"}) {
248+ id
249+ _id
250+ name
251+ clientMutationId
252+ }
253+ }
254+ """
255+ And the response should be in JSON
256+ And the header "Content-Type" should be equal to "application/json"
257+ And the JSON node "data.updateWritableId.id" should be equal to "/writable_ids/f8a708b2-310f-416c-9aef-b1b5719dfa47"
258+ And the JSON node "data.updateWritableId._id" should be equal to "f8a708b2-310f-416c-9aef-b1b5719dfa47"
259+ And the JSON node "data.updateWritableId.name" should be equal to "Foo"
260+ And the JSON node "data.updateWritableId.clientMutationId" should be equal to "m"
261+
262+ @dropSchema
224263 Scenario : Trigger a validation error
225264 When I send the following GraphQL request:
226265 """
0 commit comments