You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

graphile-build-pg

Package Overview
Dependencies
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0-beta.4 to 4.0.0-beta.5

17

node8plus/plugins/makeProcField.js

@@ -204,3 +204,4 @@ "use strict";

}
return sql.fragment`${sql.identifier(proc.namespace.name, proc.name)}(${sql.join([...implicitArgs, ...sqlArgValues], ", ")})`;
const functionCall = sql.fragment`${sql.identifier(proc.namespace.name, proc.name)}(${sql.join([...implicitArgs, ...sqlArgValues], ", ")})`;
return rawReturnType.isPgArray ? sql.fragment`unnest(${functionCall})` : functionCall;
}

@@ -213,3 +214,4 @@ function makeQuery(parsedResolveInfoFragment, ReturnType, sqlMutationQuery, functionAlias) {

asJson: !proc.returnsSet && computed && !returnFirstValueAsValue,
addNullCase: !proc.returnsSet && isTableLike
asJsonAggregate: !proc.returnsSet && computed && rawReturnType.isPgArray,
addNullCase: !proc.returnsSet && !rawReturnType.isPgArray && isTableLike
}, innerQueryBuilder => {

@@ -328,3 +330,2 @@ if (!isTableLike) {

const query = makeQuery(parsedResolveInfoFragment, resolveInfo.returnType, functionAlias, functionAlias);
const returnType = rawReturnType;
const intermediateIdentifier = sql.identifier(Symbol());

@@ -361,7 +362,9 @@ const isVoid = returnType.id === "2278";

// Connection
return (0, _addStartEndCursor2.default)(row);
} else if (proc.returnsSet) {
return rows;
return (0, _addStartEndCursor2.default)({
data: row.data.map(row => pg2gql(row, returnType))
});
} else if (proc.returnsSet || rawReturnType.isPgArray) {
return rows.map(row => pg2gql(row, returnType));
} else {
return row;
return pg2gql(row, returnType);
}

@@ -368,0 +371,0 @@ }

{
"name": "graphile-build-pg",
"version": "4.0.0-beta.4",
"version": "4.0.0-beta.5",
"description": "Build a GraphQL schema by reflection over a PostgreSQL schema. Easy to customize since it's built with plugins on graphile-build",

@@ -8,3 +8,3 @@ "main": "node8plus/index.js",

"test": "jest",
"prepublish": "mkdir -p node8plus && babel -s true --out-dir node8plus src && flow-copy-source src node8plus",
"prepack": "mkdir -p node8plus && babel -s true --out-dir node8plus src && flow-copy-source src node8plus",
"watch": "mkdir -p node8plus && babel -s true --watch --out-dir node8plus src"

@@ -40,3 +40,3 @@ },

"debug": ">=2 <3",
"graphile-build": "4.0.0-beta.4",
"graphile-build": "4.0.0-beta.5",
"graphql-iso-date": "^3.2.0",

@@ -43,0 +43,0 @@ "jsonwebtoken": "^8.1.1",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc