Browse Source

___owner find by str, not object id

Ivan Asmer 4 years ago
parent
commit
2da564c918
1 changed files with 2 additions and 0 deletions
  1. 2 0
      expand.js

+ 2 - 0
expand.js

@@ -99,6 +99,7 @@ function mmExpandSchema(gqlSchema){
 
                         const walker = obj =>{
                             for (let [key, value] of Object.entries(obj)){
+                                if (key === '___owner') continue;
                                 let newValue;
                                 if (newValue = checker(value))    obj[key] = newValue;
                                 else if (newValue && typeof newValue === 'object'){
@@ -155,6 +156,7 @@ function mmExpandSchema(gqlSchema){
                             args = JSON.parse(args.query)
                             let [query] = args
                             queryUpdater(query)
+                            console.log(query)
                             let record = Savable.m[outputTypeName].findOne(query, ...args.slice(1))
                             return record;
                         }