|
@@ -144,8 +144,9 @@ export default async function createModels2(gql, config={create: 'Upsert', updat
|
|
|
LIST(){
|
|
|
this[name] = []
|
|
|
const otherType = inTypes(ofType.name)
|
|
|
+ console.log(data, name)
|
|
|
if (otherType && data && data[name])
|
|
|
- this[name] = data[name].map(otherEntity => new classes[otherType.name](otherEntity, otherEntity._id && Object.keys(otherEntity).length === 1))
|
|
|
+ this[name] = data[name].map(otherEntity => otherEntity && (new classes[otherType.name](otherEntity, otherEntity._id && Object.keys(otherEntity).length === 1)))
|
|
|
else if (data && typeof data === 'object' && name in data) this[name] = data[name] || []
|
|
|
},
|
|
|
OBJECT(){
|