MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / _requestDelete

Method _requestDelete

lib/helper/GraphQLDataFactory.js:297–306  ·  view source on GitHub ↗

* Executes request to delete a record to the GraphQL endpoint. * Can be replaced from a custom helper. * * @param {string} operation * @param {*} data of the record to be deleted.

(operation, data)

Source from the content-addressed store, hash-verified

295 * @param {*} data of the record to be deleted.
296 */
297 _requestDelete(operation, data) {
298 const deleteOperation = this.factories[operation].revert(data)
299 const { query, variables } = deleteOperation
300
301 return this.graphqlHelper.sendMutation(query, variables).then(response => {
302 const idx = this.created[operation].indexOf(data)
303 this.debugSection('Deleted', `record: ${response.data.data}`)
304 this.created[operation].splice(idx, 1)
305 })
306 }
307}
308
309export default GraphQLDataFactory

Callers 1

_afterMethod · 0.95

Calls 1

sendMutationMethod · 0.80

Tested by

no test coverage detected