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

Method _requestCreate

lib/helper/GraphQLDataFactory.js:280–288  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 1

mutateDataMethod · 0.95

Calls 2

sendMutationMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected