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

Method mutateMultiple

lib/helper/GraphQLDataFactory.js:238–244  ·  view source on GitHub ↗

* Generates bunch of records and sends multiple GraphQL mutation requests to store them. * * ```js * // create 3 users * I.mutateMultiple('createUser', 3); * * // create 3 users of same age * I.mutateMultiple('createUser', 3, { age: 25 }); * ``` * * @param {string} oper

(operation, times, params)

Source from the content-addressed store, hash-verified

236 * @param {*} params
237 */
238 mutateMultiple(operation, times, params) {
239 const promises = []
240 for (let i = 0; i < times; i++) {
241 promises.push(this.mutateData(operation, params))
242 }
243 return Promise.all(promises)
244 }
245
246 _createItem(operation, data) {
247 if (!this.factories[operation]) {

Callers 1

Calls 2

mutateDataMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected