The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild


Hive logoHive blurred logo


Schema Registry for your GraphQL Workflows

Envelop Logo


Get Started

Plugin Hub > useFilterAllowedOperations

yarn add @envelop/filter-operation-type


This plugins injects a validation rule into the validation phase that only allows the specified operation types (e.g. subscription, query or mutation).

Getting Started#

yarn add @envelop/filter-operation-type

Usage Example#

import { envelop } from '@envelop/core'; import { useFilterAllowedOperations } from '@envelop/filter-operation-type'; const getEnveloped = envelop({ // only allow execution of subscription operations plugins: [useFilterAllowedOperations(['subscription'])], });

Plugin Details