@@ -183,6 +183,44 @@ Feature: GraphQL mutation support
183183 And the JSON node "data.updateCompositeRelation.value" should be equal to "Modified value."
184184 And the JSON node "data.updateCompositeRelation.clientMutationId" should be equal to "myId"
185185
186+ Scenario : Create an item with a custom UUID
187+ When I send the following GraphQL request:
188+ """
189+ mutation {
190+ createWritableId(input: {_id: "c6b722fe-0331-48c4-a214-f81f9f1ca082", name: "Foo", clientMutationId: "m"}) {
191+ id
192+ _id
193+ name
194+ clientMutationId
195+ }
196+ }
197+ """
198+ And the response should be in JSON
199+ And the header "Content-Type" should be equal to "application/json"
200+ And the JSON node "data.createWritableId.id" should be equal to "/writable_ids/c6b722fe-0331-48c4-a214-f81f9f1ca082"
201+ And the JSON node "data.createWritableId._id" should be equal to "c6b722fe-0331-48c4-a214-f81f9f1ca082"
202+ And the JSON node "data.createWritableId.name" should be equal to "Foo"
203+ And the JSON node "data.createWritableId.clientMutationId" should be equal to "m"
204+
205+ Scenario : Update an item with a custom UUID
206+ When I send the following GraphQL request:
207+ """
208+ mutation {
209+ updateWritableId(input: {id: "/writable_ids/c6b722fe-0331-48c4-a214-f81f9f1ca082", _id: "f8a708b2-310f-416c-9aef-b1b5719dfa47", name: "Foo", clientMutationId: "m"}) {
210+ id
211+ _id
212+ name
213+ clientMutationId
214+ }
215+ }
216+ """
217+ And the response should be in JSON
218+ And the header "Content-Type" should be equal to "application/json"
219+ And the JSON node "data.updateWritableId.id" should be equal to "/writable_ids/f8a708b2-310f-416c-9aef-b1b5719dfa47"
220+ And the JSON node "data.updateWritableId._id" should be equal to "f8a708b2-310f-416c-9aef-b1b5719dfa47"
221+ And the JSON node "data.updateWritableId.name" should be equal to "Foo"
222+ And the JSON node "data.updateWritableId.clientMutationId" should be equal to "m"
223+
186224 @dropSchema
187225 Scenario : Trigger a validation error
188226 When I send the following GraphQL request:
0 commit comments