e.select(e.User, user => ({
id: true,
following: e.select(user['<_followers'].is(e.Group), group => {
return {
name: group._name,
note: group['@_note'], // 🚨 throws "Cannot read properties of undefined (reading '__kind__')"
// '@_note': true, // 🚨 throws "cannot select link property '@_note' on an object (default::Group)"
}
}),
}))
Schema
type User {
required property _email -> str {
constraint exclusive;
}
}
type Group {
required property _name -> str {
constraint exclusive;
}
multi link _followers -> User {
property _note -> str;
property _followedAt -> datetime {
default := datetime_current();
};
}
}
Generated EdgeQLThe query cannot be generated with the link properties, but WITHOUT them the result of .toEdgeQL is:
WITH
__scope_0_User := DETACHED default::User
SELECT __scope_0_User {
id,
multi following := (
WITH
__scope_1_Group := __scope_0_User.<_followers[IS default::Group]
SELECT __scope_1_Group {
single name := __scope_1_Group._name
}
)
}
Desired behavior
Get the same results as this query.
select User { id, followers := .<_followers[is Group] { name := ._name, note := @_note } }
Code The code causing the error.
Schema
Generated EdgeQL The query cannot be generated with the link properties, but WITHOUT them the result of .toEdgeQL is:
Desired behavior
Get the same results as this query.
Versions: