UNPKG

graphql-mocks

Version:
15 lines (11 loc) 484 B
function isRootQueryType(schema, type) { var _schema$getQueryType; if (typeof type !== 'string' && !('name' in type)) { return false; } var rootQueryTypeName = (_schema$getQueryType = schema.getQueryType()) === null || _schema$getQueryType === void 0 ? void 0 : _schema$getQueryType.name; var typeName = typeof type === 'string' ? type : type.name; return typeName === rootQueryTypeName; } export { isRootQueryType }; //# sourceMappingURL=is-root-query-type.js.map