Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@envelop/graphql-executor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/graphql-executor

A customizable GraphQL Spec compliant Executor

latest
Source
npmnpm
Version
0.1.0-alpha-09b76bb.0
Version published
Maintainers
1
Created
Source

@envelop/graphql-executor

A customizable GraphQL Spec compliant Executor.

GraphQL Executor provides:

  • 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.
  • A code-only method of customizing the executor by subclassing the exported internal Executor class as above.
  • 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:

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:

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

class MyCustomExecutor extends Executor {
  // ...
}

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

FAQs

Package last updated on 15 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts