@envelop/disable-introspection
Version:
This plugin injects the `NoSchemaIntrospectionCustomRule` validation rule exported from the `graphql` module to the validation phase for disabling introspection.
9 lines (8 loc) • 355 B
TypeScript
import { DefaultContext, Plugin } from '@envelop/core';
export interface DisableIntrospectionOptions {
disableIf?: (args: {
context: DefaultContext;
params: Parameters<NonNullable<Plugin['onValidate']>>[0]['params'];
}) => boolean;
}
export declare const useDisableIntrospection: (options?: DisableIntrospectionOptions) => Plugin;