Introduction

Use this package with directives to quickly and easily describe your GraphQL circuit. 🥳

There are currently directives in the package to make CRUD based on them.

Also, there are directives for building simple relationships such as HasOne, HasMany, BelongsTo.

The package will continue to develop, but it depends on the needs of the author. The author will always be happy on your feedback of issue or Pull Request.

Required package

adonisjs: 4+

apollo-server-adonis

Installation

Install from npm

npm i apollo-server-adonis-directives-pack

Import to your app

const { makeExecutableSchema } = require('graphql-tools')
const { 
    TypeDefsDirective,
    SchemaDirective 
} = require('apollo-server-adonis-directives-pack')

module.exports = makeExecutableSchema({
    TypeDefs: TypeGefsDirective,
    schemaDirectives: SchemaDirective,
    /* ... */
})

/* or */

const { makeExecutableSchema } = require('graphql-tools')
const { 
    TypeDefsDirective,
    SchemaDirective 
} = require('apollo-server-adonis-directives-pack')

module.exports = makeExecutableSchema({
    TypeDefs: [...TypeGefsDirective, /* ... */],
    schemaDirectives: { ...SchemaDirective, /* ... */},
    /* ... */
})

Last updated