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
When using the batch check functionality in the js-sdk, the check results are not returned in the same order as the input. Based on what I've found in the python sdk, the order is preserved.
Expectation
I would expect when an array is provided as input, and the expected output is an array of equal length, order should be preserved.
Hi @a0js - batch check is not intended to preserve the output order. While we can sort before returning the results, that would be offering a contract we are not certain we want to promise for the future.
Especially with the potential to offer a streaming variant of the API.
Each response has the request alongside it so that you can know what the result is for.
Checklist
Description
When using the batch check functionality in the js-sdk, the check results are not returned in the same order as the input. Based on what I've found in the python sdk, the order is preserved.
Expectation
I would expect when an array is provided as input, and the expected output is an array of equal length, order should be preserved.
Reproduction
Run the following:
This hits this model: https://play.fga.dev/sandbox/?store=js-sdk-batch-ordering
SDK Checklist
OpenFGA SDK version
0.3.5
OpenFGA version
any
SDK Configuration
any
Logs
No response
References
This issue seems to be related to the cause rxaviers/async-pool#47
The text was updated successfully, but these errors were encountered: