Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

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

Open
COCPORN opened this issue Aug 9, 2022 · 0 comments
Open

Comments

@COCPORN
Copy link
Owner

COCPORN commented Aug 9, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant