* Executes request to create a record to the GraphQL endpoint. * Can be replaced from a custom helper. * * @param {string} operation * @param {*} variables to be sent along with the query
(operation, variables)
| 278 | * @param {*} variables to be sent along with the query |
| 279 | */ |
| 280 | _requestCreate(operation, variables) { |
| 281 | const { query } = this.factories[operation] |
| 282 | return this.graphqlHelper.sendMutation(query, variables).then(response => { |
| 283 | const data = response.data.data[operation] |
| 284 | this.created[operation].push(data) |
| 285 | this.debugSection('Created', `record: ${data}`) |
| 286 | return data |
| 287 | }) |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * Executes request to delete a record to the GraphQL endpoint. |
no test coverage detected