get-graphql-from-jsonschema
Version:
get-graphql-from-jsonschema gets a GraphQL schema from a JSON schema.
12 lines (11 loc) • 359 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasScalarType = void 0;
const scalarTypes_1 = require("./scalarTypes");
const hasScalarType = function (schema) {
if (Array.isArray(schema.type)) {
return true;
}
return schema.type in scalarTypes_1.scalarTypes;
};
exports.hasScalarType = hasScalarType;