Merge pull request #1658 from leon3s/fix-maxDepthOfQuery-config

[ BUGFIX ] maxDepthOfQuery config
This commit is contained in:
Raymond Feng 2018-11-07 12:50:42 -08:00 committed by GitHub
commit 0f0b391f67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -1705,7 +1705,12 @@ DataAccessObject._sanitizeQuery = function(query, options) {
DataAccessObject._sanitizeData = function(data, options) {
options = options || {};
return sanitizeQueryOrData(data, options);
// See https://github.com/strongloop/loopback-datasource-juggler/issues/1651
var maxDepthOfQuery = (+this._getSetting('maxDepthOfQuery')) || 12;
return sanitizeQueryOrData(data,
Object.assign({
maxDepth: maxDepthOfQuery,
}, options));
};
/*