UNPKG

graphql-modules

Version:

Create reusable, maintainable, testable and extendable GraphQL modules

17 lines (16 loc) 575 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.operationControllerCreator = operationControllerCreator; function operationControllerCreator(options) { const { contextBuilder } = options; return (input) => { const operation = contextBuilder(input.context); const ɵdestroy = input.autoDestroy ? operation.ɵdestroy : () => { }; return { context: operation.context, injector: operation.ɵinjector, destroy: operation.ɵdestroy, ɵdestroy, }; }; }