# envelop-no-alias

> Graphql envelop plugin for no alias graphql directive. It can limit the amount of alias fields that can be used for queries and mutations. Preventing batch attacks.

Latest version **3.0.3** (published 2022-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install envelop-no-alias
pnpm add envelop-no-alias
yarn add envelop-no-alias
bun add envelop-no-alias
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2022-07-05 |
| First published | 2022-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | ivandotv |
| Maintainers | ivandotv |
| Keywords | @envelop, envelop, graphql, graphql directive, graphql validation, graphql alias, graphql query alias, graphql mutation alias |

## Links

- npm: https://www.npmjs.com/package/envelop-no-alias
- Repository: https://github.com/ivandotv/graphql-no-alias
- Homepage: https://github.com/ivandotv/graphql-no-alias#readme
- Issues: https://github.com/ivandotv/graphql-no-alias/issues
- npm.io page: https://npm.io/package/envelop-no-alias

## Dependencies (1)

- [graphql-no-alias](https://npm.io/package/graphql-no-alias.md) 3.0.3

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 3.0.3 (latest) — 2022-07-05
- 3.0.2 — 2022-07-05
- 3.0.1 — 2022-07-05
- 3.0.0 — 2022-05-17
- 2.0.2 — 2022-02-04
- 2.0.1 — 2022-02-04
- 2.0.0 — 2022-02-04
- 1.0.2 — 2022-01-30
- 1.0.1 — 2022-01-30
- 1.0.0 — 2022-01-24

## README

# Envelop Plugin

This package is an [envelop plugin](https://www.envelop.dev) version of
[`graphql-no-alias`](https://github.com/ivandotv/graphql-no-alias) validation directive.

## Install

```sh
npm Install envelop-no-alias
```

## Usage

```ts
import { envelop } from '@envelop/core'
import { useNoAlias, Config } from 'envelop-no-alias'

//optional configuration
const config: Config = {}
const getEnveloped = envelop({
  plugins: [useNoAlias(config)]
})
```

Or if you are using type definitions:

```ts
import { envelop } from '@envelop/core'
import { useNoAlias, createTypeDefinition } from 'envelop-no-alias'

//add type defintion to schema
const schema = buildSchema(`
  ${createTypeDefinition()}
  type Query {
    hello: String @noAlias(allow:2)
  }

  type Mutation @noAlias {
    muteOne(n:Int):String
  }
`)

const getEnveloped = envelop({
  plugins: [useNoAlias()]
})
```

---
_Source: https://npm.io/package/envelop-no-alias · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
