# @envelop/graphql-executor

> A customizable GraphQL Spec compliant Executor

Latest version **0.1.0-alpha-09b76bb.0** (published 2021-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @envelop/graphql-executor
pnpm add @envelop/graphql-executor
yarn add @envelop/graphql-executor
bun add @envelop/graphql-executor
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.0-alpha-09b76bb.0 |
| Published | 2021-11-15 |
| First published | 2021-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 825 |
| Author | Saihajpreet Singh |
| Maintainers | dotansimha |

## Links

- npm: https://www.npmjs.com/package/@envelop/graphql-executor
- Repository: https://github.com/dotansimha/envelop
- Homepage: https://github.com/dotansimha/envelop#readme
- Issues: https://github.com/dotansimha/envelop/issues
- npm.io page: https://npm.io/package/@envelop/graphql-executor

## Dependencies (1)

- [graphql-executor](https://npm.io/package/graphql-executor.md) ^0.0.8

## Recent versions

- 0.1.0-alpha-09b76bb.0 (latest) — 2021-11-15
- 0.1.0-alpha-2603394.0 (alpha) — 2022-07-13

## README

## `@envelop/graphql-executor`

A customizable GraphQL Spec compliant Executor.

GraphQL Executor provides:

1. A way to fork the GraphQL.JS executor without introducing multiple versions of graphql-js into your project. graphql-executor is a smart fork of only the execution module of graphql-js. You can safely fork graphql-executor to customize your execution flow as needed.
2. A code-only method of customizing the executor by subclassing the exported internal Executor class as above.
3. Direct benefits from our own customizations! GraphQL Executor is spec-compliant, but aims to support experimental features (such as @defer/@stream support) and provide other improvements as possible. See (https://github.com/yaacovCR/graphql-executor/releases) to track any new features.

## Getting Started

Start by installing the plugin:

```
yarn add @envelop/graphql-executor
```

Then, use the plugin with your validation rules:

```ts
import { useGraphQLExecutor } from '@envelop/extended-validation';

const getEnveloped = envelop({
  plugins: [useGraphQLExecutor({})],
});
```

To create your custom executor, implement the `Executor` class from `graphql-executor`.

For example:

```ts
import { Executor } from 'graphql-executor';
import { useGraphQLExecutor } from '@envelop/extended-validation';

class MyCustomExecutor extends Executor {
  // ...
}

const getEnveloped = envelop({
  plugins: [useGraphQLExecutor({ customExecutor: new MyCustomExecutor() })],
});
```

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