浏览代码

+jwtGQLRole for anon, query recursive walker for object id and regexp

Ivan Asmer 5 年之前
父节点
当前提交
4bad59a715
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      expand.js

+ 2 - 2
expand.js

@@ -61,7 +61,7 @@ function mmExpandSchema(gqlSchema){
                 if (outputTypeName in _typeMap){
                     types[outputTypeName] = type
 
-                    const queryUpdater(query){
+                    const queryUpdater = query => {
                         const checkers = [
                             function objectID(val){
                                 if (val && typeof val === 'string' && val.length == 24){
@@ -117,7 +117,7 @@ function mmExpandSchema(gqlSchema){
 
                             const Savable = context.models.SlicedSavable || context.models.Savable 
                             args = JSON.parse(args.query)
-                            walker(args)
+                            walker(args[0])
                             console.log(args)
                             let results = []