1 | import { GraphQLSchema } from 'graphql';
|
2 | /**
|
3 | * Options for removing unused types from the schema
|
4 | */
|
5 | export interface PruneSchemaOptions {
|
6 | /**
|
7 | * Set to `true` to skip pruning object types or interfaces with no no fields
|
8 | */
|
9 | skipEmptyCompositeTypePruning?: boolean;
|
10 | /**
|
11 | * Set to `true` to skip pruning interfaces that are not implemented by any
|
12 | * other types
|
13 | */
|
14 | skipUnimplementedInterfacesPruning?: boolean;
|
15 | /**
|
16 | * Set to `true` to skip pruning empty unions
|
17 | */
|
18 | skipEmptyUnionPruning?: boolean;
|
19 | /**
|
20 | * Set to `true` to skip pruning unused types
|
21 | */
|
22 | skipUnusedTypesPruning?: boolean;
|
23 | }
|
24 | /**
|
25 | * Prunes the provided schema, removing unused and empty types
|
26 | * @param schema The schema to prune
|
27 | * @param options Additional options for removing unused types from the schema
|
28 | */
|
29 | export declare function pruneSchema(schema: GraphQLSchema, options?: PruneSchemaOptions): GraphQLSchema;
|