graphile-build-pg
Advanced tools
Comparing version 0.1.0-alpha.24 to 0.1.0-alpha.25
@@ -31,4 +31,3 @@ "use strict"; | ||
introspectionResultsByKind = _ref2.pgIntrospectionResultsByKind, | ||
sql = _ref2.pgSql, | ||
GraphQLNonNull = _ref2.graphql.GraphQLNonNull; | ||
sql = _ref2.pgSql; | ||
var _ref3$scope = _ref3.scope, | ||
@@ -41,5 +40,2 @@ isPgRowType = _ref3$scope.isPgRowType, | ||
var nullableIf = function nullableIf(condition, Type) { | ||
return condition ? Type : new GraphQLNonNull(Type); | ||
}; | ||
var table = pgIntrospectionTable || pgIntrospection; | ||
@@ -137,5 +133,3 @@ if (!(isPgRowType || isMutationPayload) || !table || table.kind !== "class") { | ||
description: `Reads a single \`${foreignTableTypeName}\` that is related to this \`${tableTypeName}\`.`, | ||
type: nullableIf(isMutationPayload || !keys.every(function (key) { | ||
return key.isNotNull; | ||
}), gqlForeignTableType), | ||
type: gqlForeignTableType, // Nullable since RLS may forbid fetching | ||
resolve: function resolve(rawData, _args, _context, resolveInfo) { | ||
@@ -142,0 +136,0 @@ var data = isMutationPayload ? rawData.data : rawData; |
@@ -29,4 +29,3 @@ "use strict"; | ||
pgIntrospectionResultsByKind: introspectionResultsByKind, | ||
pgSql: sql, | ||
graphql: { GraphQLNonNull } | ||
pgSql: sql | ||
}, { | ||
@@ -41,3 +40,2 @@ scope: { | ||
}) => { | ||
const nullableIf = (condition, Type) => condition ? Type : new GraphQLNonNull(Type); | ||
const table = pgIntrospectionTable || pgIntrospection; | ||
@@ -104,3 +102,3 @@ if (!(isPgRowType || isMutationPayload) || !table || table.kind !== "class") { | ||
description: `Reads a single \`${foreignTableTypeName}\` that is related to this \`${tableTypeName}\`.`, | ||
type: nullableIf(isMutationPayload || !keys.every(key => key.isNotNull), gqlForeignTableType), | ||
type: gqlForeignTableType, // Nullable since RLS may forbid fetching | ||
resolve: (rawData, _args, _context, resolveInfo) => { | ||
@@ -107,0 +105,0 @@ const data = isMutationPayload ? rawData.data : rawData; |
{ | ||
"name": "graphile-build-pg", | ||
"version": "0.1.0-alpha.24", | ||
"version": "0.1.0-alpha.25", | ||
"description": "Build a GraphQL schema by reflection over a PostgreSQL schema. Easy to customize since it's built with plugins on graphile-build", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1323973
9108