@createMany

Create many new Lucid models with the given arguments.

circle-exclamation

For a separate add use

/* ... */
const {
  CreateManyDirective,
  CreateManyTypeDefs
} = require('apollo-server-adonis-directives-pack/src/directives/mutation/CreateMany')

makeExecutableSchema({ 
  /* ... */ 
  typeDefs: [ CreateManyTypeDefs, /* ... */ ],
  schemaDirectives: { CreateManyDirective, /* ... */} 
})

Definition

CreateManyTypeDefs
directive @createMany(
  # By default, the model will be calculated from the name
  # of the returned "type" with the prefix 'App/Model/'
  model: String) on FIELD_DEFINITION
circle-check

Example

Last updated