@graphql-mesh/transport-rest
Version:
10 lines (9 loc) • 422 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDiscriminatorAnnotations = void 0;
function processDiscriminatorAnnotations({ interfaceType, discriminatorFieldName, }) {
interfaceType.resolveType = function discriminatorDirectiveHandler(root) {
return root[discriminatorFieldName];
};
}
exports.processDiscriminatorAnnotations = processDiscriminatorAnnotations;
;