UNPKG

graphql-mocks

Version:
21 lines (15 loc) 584 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function isRootQueryType(schema, type) { var _schema$getQueryType; if (typeof type !== 'string' && !('name' in type)) { return false; } const rootQueryTypeName = (_schema$getQueryType = schema.getQueryType()) === null || _schema$getQueryType === void 0 ? void 0 : _schema$getQueryType.name; const typeName = typeof type === 'string' ? type : type.name; return typeName === rootQueryTypeName; } exports.isRootQueryType = isRootQueryType; //# sourceMappingURL=is-root-query-type.js.map