Support include('*') Query (#4947)

This commit is contained in:
Diamond Lewis
2018-08-10 12:51:32 -05:00
committed by GitHub
parent 35da17b32a
commit f1b008388c
2 changed files with 48 additions and 0 deletions

View File

@@ -114,6 +114,10 @@ function RestQuery(config, auth, className, restWhere = {}, restOptions = {}, cl
break;
case 'include': {
const paths = restOptions.include.split(',');
if (paths.includes('*')) {
this.includeAll = true;
break;
}
// Load the existing includes (from keys)
const pathSet = paths.reduce((memo, path) => {
// Split each paths on . (a.b.c -> [a,b,c])