Socket
Socket
Sign inDemoInstall

simple-graphql

Package Overview
Dependencies
Maintainers
1
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-graphql - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

lib/package.json
{
"name": "simple-graphql",
"version": "0.2.0",
"version": "0.2.1",
"description": "The simple way to build GraphQL style API with MySQL/PostreSQL",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -232,34 +232,36 @@ 'use strict';

case 0:
conditionFieldKeys.forEach(function (fieldKey) {
if (args.condition && args.condition[fieldKey]) {
args.condition[fieldKey] = _.mapKeys(args.condition[fieldKey], function (value, key) {
return '$' + key;
});
}
});
dbModel = models[model.name];
condition = {};
_.forOwn(model.config.fields, function (value, key) {
if (value instanceof _ModelRef2.default || value && value.$type instanceof _ModelRef2.default) {
if (!key.endsWith('Id')) {
key = key + 'Id';
if (args && args.condition) {
conditionFieldKeys.forEach(function (fieldKey) {
if (args.condition && args.condition[fieldKey]) {
args.condition[fieldKey] = _.mapKeys(args.condition[fieldKey], function (value, key) {
return '$' + key;
});
}
if (typeof args.condition[key] !== 'undefined') {
if (dbModel.options.underscored) {
condition[key.replace(/([A-Z])/g, '_$1').replace(/^_/, '').toLocaleLowerCase()] = args.condition[key];
} else {
condition[key] = args.condition[key];
});
condition = {};
_.forOwn(model.config.fields, function (value, key) {
if (value instanceof _ModelRef2.default || value && value.$type instanceof _ModelRef2.default) {
if (!key.endsWith('Id')) {
key = key + 'Id';
}
if (typeof args.condition[key] !== 'undefined') {
if (dbModel.options.underscored) {
condition[key.replace(/([A-Z])/g, '_$1').replace(/^_/, '').toLocaleLowerCase()] = args.condition[key];
} else {
condition[key] = args.condition[key];
}
}
} else if (typeof args.condition[key] !== 'undefined') {
condition[key] = args.condition[key];
}
} else if (typeof args.condition[key] !== 'undefined') {
condition[key] = args.condition[key];
}
});
args.condition = condition;
});
args.condition = condition;
}
return _context.abrupt('return', _index2.default.Connection.resolve(dbModel, args));
case 6:
case 3:
case 'end':

@@ -266,0 +268,0 @@ return _context.stop();

{
"name": "simple-graphql",
"version": "0.2.0",
"version": "0.2.1",
"description": "The simple way to build GraphQL style API with MySQL/PostreSQL",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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