1 | Object.defineProperty(exports, "__esModule", { value: true });
|
2 | var TransformRootFields_1 = require("./TransformRootFields");
|
3 | var FilterRootFields = (function () {
|
4 | function FilterRootFields(filter) {
|
5 | this.transformer = new TransformRootFields_1.default(function (operation, fieldName, field) {
|
6 | if (filter(operation, fieldName, field)) {
|
7 | return undefined;
|
8 | }
|
9 | else {
|
10 | return null;
|
11 | }
|
12 | });
|
13 | }
|
14 | FilterRootFields.prototype.transformSchema = function (originalSchema) {
|
15 | return this.transformer.transformSchema(originalSchema);
|
16 | };
|
17 | return FilterRootFields;
|
18 | }());
|
19 | exports.default = FilterRootFields;
|
20 |
|
\ | No newline at end of file |