COCPORN/OCore

Make it possible to query multiple types of DataEntity in a single call

COCPORN opened this issue · 0 comments

We want this (from README.md):

This makes it simple to create logical entities that are partially and lazily loaded on demand. Also, this extends to being able to fetch multiple entities in a single HTTP call [WIP]:

### Multi entity fetch
GET http://localhost:9000/data/User,Contacts/Id1

That is, we want to be able to comma-separate DataEntity-types to do a server-side fan-out. We also want this:

### Multi entity fetch
GET http://localhost:9000/data/User,Contacts/Id1,Id2,Id3

To do a multi-dimensional fan-out.

Suggested return format (single ID):

{
   "User": {
     // User-result
   },
   "Contacts": {
     // Contacts-result
   }
}

Suggested return format (multiple IDs):

[
   {
      "User": {
        // User-result
      },
      "Contacts": {
        // Contacts-result
      }
   },
   // ...
]

...where the position matches the ID-position in the query string, the same way the currently implemented multi-fetch does it.