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 0.1.0-alpha.19 to 0.1.0-alpha.20

19

node7minus/plugins/PgJWTPlugin.js

@@ -7,4 +7,10 @@ "use strict";

var _keys = require("babel-runtime/core-js/object/keys");
var _keys2 = _interopRequireDefault(_keys);
var _jsonwebtoken = require("jsonwebtoken");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function PgJWTPlugin(builder, _ref) {

@@ -78,4 +84,13 @@ var inflection = _ref.pgInflection,

pg2GqlMapper[compositeType.id] = {
map: function map(_) {
return _;
map: function map(value) {
if (!value) return null;
var values = (0, _keys2.default)(value).map(function (k) {
return value[k];
});
if (values.every(function (v) {
return v == null;
})) {
return null;
}
return value;
},

@@ -82,0 +97,0 @@ unmap: function unmap() {

@@ -7,4 +7,10 @@ "use strict";

var _keys = require("babel-runtime/core-js/object/keys");
var _keys2 = _interopRequireDefault(_keys);
var _jsonwebtoken = require("jsonwebtoken");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function PgJWTPlugin(builder, { pgInflection: inflection, pgJwtTypeIdentifier, pgJwtSecret }) {

@@ -63,3 +69,10 @@ builder.hook("init", (_, {

pg2GqlMapper[compositeType.id] = {
map: _ => _,
map: value => {
if (!value) return null;
const values = (0, _keys2.default)(value).map(k => value[k]);
if (values.every(v => v == null)) {
return null;
}
return value;
},
unmap: () => {

@@ -66,0 +79,0 @@ throw new Error("We don't support passing a JWT token into GraphQL currently");

2

package.json
{
"name": "graphile-build-pg",
"version": "0.1.0-alpha.19",
"version": "0.1.0-alpha.20",
"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

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