18 lines
664 B
JavaScript
Raw Permalink Normal View History

2024-10-17 21:31:23 +03:00
import { applySchemaTransforms } from './applySchemaTransforms.js';
export function isSubschema(value) {
return Boolean(value.transformedSchema);
}
export class Subschema {
constructor(config) {
var _a;
this.schema = config.schema;
this.executor = config.executor;
this.batch = config.batch;
this.batchingOptions = config.batchingOptions;
this.createProxyingResolver = config.createProxyingResolver;
this.transforms = (_a = config.transforms) !== null && _a !== void 0 ? _a : [];
this.transformedSchema = applySchemaTransforms(this.schema, config);
this.merge = config.merge;
}
}