UNPKG

@graphql-mesh/transform-filter-schema

Version:
14 lines (13 loc) 993 B
import type { GraphQLSchema } from 'graphql'; import type { YamlConfig } from '@graphql-mesh/types'; import type { DelegationContext, SubschemaConfig, Transform } from '@graphql-tools/delegate'; import type { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils'; export default class WrapFilter implements Transform { private transforms; constructor({ config: { filters, filterDeprecatedFields, filterDeprecatedTypes }, }: { config: YamlConfig.FilterSchemaTransform; }); transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig, transformedSchema?: GraphQLSchema): GraphQLSchema; transformRequest(originalRequest: ExecutionRequest, delegationContext: DelegationContext, transformationContext: Record<string, any>): ExecutionRequest<any, any, any, Record<string, any>, any>; transformResult(originalResult: ExecutionResult, delegationContext: DelegationContext, transformationContext: any): ExecutionResult<any, any>; }