get-convex / convex-ents

https://labs.convex.dev/convex-ents
25 stars 5 forks source link

Allow using single cardinality edge names in place of field names #9

Open xixixao opened 10 months ago

xixixao commented 10 months ago

For example in insert, it would be nice to be able to do insert({author: ent}) instead of insert({authorId: ent._id})

Similarly when looking up by an index: get("author", ent) in place of get("authorId", ent._id)

Multiple cardinality edges use edge names but only take lists of IDs. They could support passing in lists of Ents (from which the ._id can be automatically retrieved).