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 3.1.16 to 3.1.17

18

dist/build/buildFieldTypeContext.js

@@ -292,9 +292,21 @@ "use strict";

if (schemas.find(s => s.name === subTypeName) != null) {
if (root[fieldName] != null && root[fieldName].length > 0 && (typeof root[fieldName][0] === 'string' || typeof root[fieldName][0] === 'number')) {
if (root[fieldName] != null && root[fieldName].length > 0 &&
(typeof root[fieldName][0] === 'string' ||
typeof root[fieldName][0] === 'number' ||
(root[fieldName][0] != null && typeof root[fieldName][0].id === 'string' && relay.fromGlobalId(root[fieldName][0].id).type === subTypeName))) {
const dbModel = sgContext.models[subTypeName];
const ids = root[fieldName].map(r => {
if (typeof r === 'string' && relay.fromGlobalId(r).type === subTypeName) {
return relay.fromGlobalId(r).id;
}
else if (r != null && typeof r.id === 'string' && relay.fromGlobalId(r.id).type === subTypeName) {
return relay.fromGlobalId(r).id;
}
return r;
});
const list = yield (dbModel.withCache ? dbModel.withCache() : dbModel).findAll({
where: { id: { [sequelize_1.default.Op.in]: root[fieldName] } }
where: { id: { [sequelize_1.default.Op.in]: ids } }
});
const result = [];
for (const id of root[fieldName]) {
for (const id of ids) {
const element = list.find(e => '' + e.id === '' + id);

@@ -301,0 +313,0 @@ if (element) {

2

package.json
{
"name": "simple-graphql",
"version": "3.1.16",
"version": "3.1.17",
"description": "The simple way to generates GraphQL schemas and Sequelize models from your models definition.",

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

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