@escape.tech/graphql-armor
Version:
Dead-simple, yet highly customizable security middleware for Apollo GraphQL servers shield
14 lines (13 loc) • 495 B
TypeScript
import type { ApolloServerPlugin } from '@apollo/server';
import type { GraphQLArmorConfig } from '@escape.tech/graphql-armor-types';
import type { ValidationRule } from 'graphql';
export declare class ApolloArmor {
private readonly protections;
constructor(config?: GraphQLArmorConfig);
protect(): {
plugins: ApolloServerPlugin[];
validationRules: ValidationRule[];
allowBatchedHttpRequests: false;
includeStacktraceInErrorResponses: false;
};
}