File tree Expand file tree Collapse file tree 2 files changed +25
-23
lines changed Expand file tree Collapse file tree 2 files changed +25
-23
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import {
1414 isInputObjectType ,
1515} from 'graphql' ;
1616
17+ import { PruneSchemaOptions } from './types' ;
18+
1719import { mapSchema } from './mapSchema' ;
1820import { MapperKind } from './Interfaces' ;
1921
@@ -31,29 +33,6 @@ interface PruningContext {
3133 implementations : Record < string , Record < string , boolean > > ;
3234}
3335
34- /**
35- * Options for removing unused types from the schema
36- */
37- export interface PruneSchemaOptions {
38- /**
39- * Set to `true` to skip pruning object types or interfaces with no no fields
40- */
41- skipEmptyCompositeTypePruning ?: boolean ;
42- /**
43- * Set to `true` to skip pruning interfaces that are not implemented by any
44- * other types
45- */
46- skipUnimplementedInterfacesPruning ?: boolean ;
47- /**
48- * Set to `true` to skip pruning empty unions
49- */
50- skipEmptyUnionPruning ?: boolean ;
51- /**
52- * Set to `true` to skip pruning unused types
53- */
54- skipUnusedTypesPruning ?: boolean ;
55- }
56-
5736/**
5837 * Prunes the provided schema, removing unused and empty types
5938 * @param schema The schema to prune
Original file line number Diff line number Diff line change @@ -13,3 +13,26 @@ export interface SchemaPrintOptions {
1313export type Maybe < T > = null | undefined | T ;
1414
1515export type Constructor < T > = new ( ...args : any [ ] ) => T ;
16+
17+ /**
18+ * Options for removing unused types from the schema
19+ */
20+ export interface PruneSchemaOptions {
21+ /**
22+ * Set to `true` to skip pruning object types or interfaces with no no fields
23+ */
24+ skipEmptyCompositeTypePruning ?: boolean ;
25+ /**
26+ * Set to `true` to skip pruning interfaces that are not implemented by any
27+ * other types
28+ */
29+ skipUnimplementedInterfacesPruning ?: boolean ;
30+ /**
31+ * Set to `true` to skip pruning empty unions
32+ */
33+ skipEmptyUnionPruning ?: boolean ;
34+ /**
35+ * Set to `true` to skip pruning unused types
36+ */
37+ skipUnusedTypesPruning ?: boolean ;
38+ }
You can’t perform that action at this time.
0 commit comments