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

Method mutateData

lib/helper/GraphQLDataFactory.js:217–221  ·  view source on GitHub ↗

* Generates a new record using factory, sends a GraphQL mutation to store it. * * ```js * // create a user * I.mutateData('createUser'); * // create user with defined email * // and receive it when inside async function * const user = await I.mutateData('createUser', { email: 'u

(operation, params)

Source from the content-addressed store, hash-verified

215 * @param {*} params predefined parameters
216 */
217 mutateData(operation, params) {
218 const variables = this._createItem(operation, params)
219 this.debug(`Creating ${operation} ${JSON.stringify(variables)}`)
220 return this._requestCreate(operation, variables)
221 }
222
223 /**
224 * Generates bunch of records and sends multiple GraphQL mutation requests to store them.

Callers 2

mutateMultipleMethod · 0.95

Calls 3

_createItemMethod · 0.95
_requestCreateMethod · 0.95
debugMethod · 0.80

Tested by

no test coverage detected