@graphql-tools/utils
Version:
Common package containing utils and types for GraphQL tools
13 lines (12 loc) • 409 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getObjectTypeFromTypeMap = getObjectTypeFromTypeMap;
const graphql_1 = require("graphql");
function getObjectTypeFromTypeMap(typeMap, type) {
if (type) {
const maybeObjectType = typeMap[type.name];
if ((0, graphql_1.isObjectType)(maybeObjectType)) {
return maybeObjectType;
}
}
}
;