simple-graphql
Advanced tools
Comparing version 3.1.12 to 3.1.13
import { FragmentDefinitionNode, SelectionNode } from "graphql"; | ||
export default function parseSelections(fragments: Array<FragmentDefinitionNode>, selections: ReadonlyArray<SelectionNode>, base?: { | ||
export default function parseSelections(fragments: { | ||
[key: string]: FragmentDefinitionNode; | ||
}, selections: ReadonlyArray<SelectionNode>, base?: { | ||
namedType: string; | ||
}): any[]; |
@@ -57,3 +57,3 @@ "use strict"; | ||
const getSelections = info => { | ||
const fragments = info.fragments || []; | ||
const fragments = info.fragments || {}; | ||
let selections = []; | ||
@@ -60,0 +60,0 @@ (info.fieldNodes || []).forEach(node => { |
"use strict"; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -9,4 +20,15 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
options = options || {}; | ||
return md5_1.default(JSON.stringify(Object.assign(Object.assign({}, options), { where: dbModel.QueryGenerator.whereQuery(options.where) }))); | ||
const formatInclude = (include) => { | ||
if (include && include.parent !== undefined) { | ||
const { parent } = include, other = __rest(include, ["parent"]); | ||
if (other.include && Array.isArray(other.include)) { | ||
other.include = other.include.map(i => formatInclude(i)); | ||
} | ||
return other; | ||
} | ||
return include; | ||
}; | ||
const include = (options.include || []).map(i => formatInclude(i)); | ||
return md5_1.default(JSON.stringify(Object.assign(Object.assign({}, options), { include: include, where: dbModel.QueryGenerator.whereQuery(options.where) }))); | ||
}); | ||
//# sourceMappingURL=getFindOptionsKey.js.map |
{ | ||
"name": "simple-graphql", | ||
"version": "3.1.12", | ||
"version": "3.1.13", | ||
"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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325836
4628