Socket
Socket
Sign inDemoInstall

graphile-build-pg

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphile-build-pg - npm Package Compare versions

Comparing version 5.0.0-beta.22 to 5.0.0-beta.23

34

dist/plugins/PgNodeIdAttributesPlugin.js

@@ -90,2 +90,3 @@ "use strict";

const $nodeId = val.get();
const $nodeIdExists = condition("exists", $nodeId);
const spec = getSpec($nodeId);

@@ -96,6 +97,7 @@ for (let i = 0, l = localAttributes.length; i < l; i++) {

const remoteName = remoteAttributes[i];
const $rawCol = spec[remoteName];
// const $col = nodeIdentifierColumnOrNull($nodeId, spec, 'id')
const $col = assertNotNull(trap($rawCol, TRAP_INHIBITED), `Invalid node identifier for '${typeName}'`, { if: condition("exists", $nodeId) });
const sqlRemoteValue = $condition.placeholder($col, codec);
// Set `null` if invalid
const $rawValue = trap(spec[remoteName], TRAP_INHIBITED);
// If `null` but `$nodeId` wasn't null, throw an error: invalid Node ID!
const $value = assertNotNull($rawValue, `Invalid node identifier for '${typeName}'`, { if: $nodeIdExists });
const sqlRemoteValue = $condition.placeholder($value, codec);
$condition.where({

@@ -119,11 +121,25 @@ type: "attribute",

])
: (0, graphile_build_1.EXPORTABLE)((getSpec, localAttributes, remoteAttributes) => function plan($insert, val) {
const spec = getSpec(val.get());
: (0, graphile_build_1.EXPORTABLE)((TRAP_INHIBITED, assertNotNull, condition, getSpec, localAttributes, remoteAttributes, trap, typeName) => function plan($insert, val) {
const $nodeId = val.get();
const $nodeIdExists = condition("exists", $nodeId);
const spec = getSpec($nodeId);
for (let i = 0, l = localAttributes.length; i < l; i++) {
const localName = localAttributes[i];
const remoteName = remoteAttributes[i];
const $val = spec[remoteName];
$insert.set(localName, $val);
// Set `null` if invalid
const $rawValue = trap(spec[remoteName], TRAP_INHIBITED);
// If `null` but `$nodeId` wasn't null, throw an error: invalid Node ID!
const $value = assertNotNull($rawValue, `Invalid node identifier for '${typeName}'`, { if: $nodeIdExists });
$insert.set(localName, $value);
}
}, [getSpec, localAttributes, remoteAttributes]),
}, [
grafast_1.TRAP_INHIBITED,
grafast_1.assertNotNull,
grafast_1.condition,
getSpec,
localAttributes,
remoteAttributes,
grafast_1.trap,
typeName,
]),
}),

@@ -130,0 +146,0 @@ }, `Adding input object 'ID' field to ${pgCodec.name} (action = ${action}) representing relation ${relationName}.`);

@@ -1,2 +0,2 @@

export declare const version = "5.0.0-beta.22";
export declare const version = "5.0.0-beta.23";
//# sourceMappingURL=version.d.ts.map

@@ -5,3 +5,3 @@ "use strict";

// This file is autogenerated by /scripts/postversion.mjs
exports.version = "5.0.0-beta.22";
exports.version = "5.0.0-beta.23";
//# sourceMappingURL=version.js.map
{
"name": "graphile-build-pg",
"version": "5.0.0-beta.22",
"version": "5.0.0-beta.23",
"description": "PostgreSQL plugins for Graphile Build - build a supercharged GraphQL schema by reflection over a PostgreSQL database and executed by Grafast.",

@@ -56,5 +56,5 @@ "type": "commonjs",

"peerDependencies": {
"@dataplan/pg": "^0.0.1-beta.19",
"grafast": "^0.1.1-beta.8",
"graphile-build": "5.0.0-beta.18",
"@dataplan/pg": "^0.0.1-beta.20",
"grafast": "^0.1.1-beta.9",
"graphile-build": "5.0.0-beta.19",
"graphile-config": "^0.0.1-beta.8",

@@ -92,3 +92,3 @@ "graphql": "^16.1.0-experimental-stream-defer.6",

"fastify-static": "^4.7.0",
"graphile-export": "^0.0.2-beta.13",
"graphile-export": "^0.0.2-beta.14",
"graphql": "16.1.0-experimental-stream-defer.6",

@@ -95,0 +95,0 @@ "graphql-helix": "^1.13.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc