You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't required for simple N+1 relationships, we would use this for optimised commands.
For example, a function definition could support batch api calls if exposed with array parameter annotation.
/** * Answers the question: `Are these users active?` * @pure * @param ids user-ids to query * @batch user_is_active ids id */functionusers_are_active(ids: Array<string>): boolean{
...
}
Exposes users_are_active as normal, and user_is_active as if it had id parameter instead of ids and uses Variables capability to wire up relationships.
While we design a solution that would allow per-function batch behaviour declaration that the engine can dispatch on, we could implement blankey ForEach support in TS connector and make the decision to perform a batch call in the connector.
The text was updated successfully, but these errors were encountered:
One problem right now is that arguments are just Values, so we would need a way to specify them via variables. But the idea seems good in general to me.
This isn't required for simple N+1 relationships, we would use this for optimised commands.
For example, a function definition could support batch api calls if exposed with array parameter annotation.
Exposes
users_are_active
as normal, anduser_is_active
as if it hadid
parameter instead ofids
and uses Variables capability to wire up relationships.N+1 Engine Feature: https://hasurahq.atlassian.net/browse/V3API-194
While we design a solution that would allow per-function batch behaviour declaration that the engine can dispatch on, we could implement blankey ForEach support in TS connector and make the decision to perform a batch call in the connector.
The text was updated successfully, but these errors were encountered: