Browse Source

identity map fixes

Ivan Asmer 4 years ago
parent
commit
56763009f1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/front-models.js

+ 3 - 0
src/front-models.js

@@ -218,6 +218,9 @@ export default async function createModels2(gql, config={create: 'Upsert', updat
                                 }
                     `
                     let result = await gql.request(gqlQuery, {data})
+                    if (result._id && !(result._id in identityMap)){
+                        identityMap[result._id] = this
+                    }
                     this.populate(result)
                 }