@all
Request all Lucid models
For a separate add use
/* ... */
const {
AllDirective,
AllTypeDefs
} = require('apollo-server-adonis-directives-pack/src/directives/query/All')
makeExecutableSchema({
/* ... */
typeDefs: [ AllTypeDefs, /* ... */ ],
schemaDirectives: { AllDirective, /* ... */}
})
Definition
# returns a collection of all models of this specified return type
directive @all on FIELD_DEFINITION
Example
type Query {
posts: [Post] @all
}
Last updated
Was this helpful?