> For the complete documentation index, see [llms.txt](https://yeti-dev.gitbook.io/apollo-server-adonis-directive-pack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yeti-dev.gitbook.io/apollo-server-adonis-directive-pack/master.md).

# Introduction

Use this package with directives to quickly and easily describe your GraphQL circuit. :partying\_face:&#x20;

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

```javascript
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, /* ... */},
    /* ... */
})
```
