get-graphql-from-jsonschema
Advanced tools
Comparing version
@@ -8,2 +8,3 @@ "use strict"; | ||
const handleObjectType = function ({ path, schema, direction }) { | ||
var _a; | ||
if (!schema.properties) { | ||
@@ -26,3 +27,3 @@ throw new errors_1.errors.SchemaInvalid(`Property 'properties' at '${toBreadcrumb_1.toBreadcrumb(path)}' is missing.`); | ||
for (const [propertyName, propertySchema] of Object.entries(schema.properties)) { | ||
const isRequired = (schema.required && schema.required.includes(propertyName)) || false; | ||
const isRequired = (_a = (schema.required && schema.required.includes(propertyName)), (_a !== null && _a !== void 0 ? _a : false)); | ||
const { typeName: propertyGraphqlTypeName, typeDefinitions: propertyGraphqlTypeDefinitions } = parseSchema_1.parseSchema({ | ||
@@ -29,0 +30,0 @@ path: [...path, propertyName], |
@@ -36,3 +36,3 @@ import { Direction } from './Direction'; | ||
schema.required && schema.required.includes(propertyName) | ||
) || false; | ||
) ?? false; | ||
@@ -39,0 +39,0 @@ const { |
{ | ||
"name": "get-graphql-from-jsonschema", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "get-graphql-from-jsonschema gets a GraphQL schema from a JSON schema.", | ||
@@ -18,10 +18,11 @@ "contributors": [ | ||
"dependencies": { | ||
"defekt": "5.0.0" | ||
"defekt": "5.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/common-tags": "1.8.0", | ||
"@types/json-schema": "7.0.3", | ||
"assertthat": "5.0.2", | ||
"@types/json-schema": "7.0.4", | ||
"assertthat": "5.1.0", | ||
"common-tags": "1.8.0", | ||
"roboter": "9.2.0" | ||
"roboter": "11.0.12", | ||
"semantic-release-configuration": "1.0.16" | ||
}, | ||
@@ -28,0 +29,0 @@ "repository": { |
@@ -7,9 +7,9 @@ # get-graphql-from-jsonschema | ||
| Category | Status | | ||
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| Version | [](https://www.npmjs.com/package/get-graphql-from-jsonschema) | | ||
| Dependencies |  | | ||
| Dev dependencies |  | | ||
| Build | [](https://circleci.com/gh/thenativeweb/get-graphql-from-jsonschema/tree/master) | | ||
| License |  | | ||
| Category | Status | | ||
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------- | | ||
| Version | [](https://www.npmjs.com/package/get-graphql-from-jsonschema) | | ||
| Dependencies |  | | ||
| Dev dependencies |  | | ||
| Build |  | | ||
| License |  | | ||
@@ -16,0 +16,0 @@ ## Installation |
22222
0.64%46
4.55%463
0.87%6
20%+ Added
- Removed
Updated