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
{{ message }}
Repository navigation
get_store should have an optional store_id parameter #9
In the current implementation, get_store return the OpenFGA store specified in the client_api configuration.
Except by listing all the stores with list_stores, I don't see any other way to get a specific store different of the one defined in the configuration.
A way to arrange that would be to add an optional store_id parameter to get_store.
for requests that use the storeId in the path, update the request options object to include a storeId
In OpenFgaClient, if the options are not null and storeId is non-null and non-empty, use that to build the path. Otherwise, use the storeId configured on the client
Update the tests to verify that the storeId can be overridden per request, and that the value on the client is used if not overridden.
In general, it should be pretty similar to how the authorizationModelId is allowed to be overridden per request.
Currently, our SDKs now expect you to generate a new client per store. In the future (as part of openfga/sdk-generator#118) we are exploring offering two different interfaces which would allow us to have one that allows calling one with dynamic storeIds, but I don't expect that to be soon
Can you elaborate on your use-case where you would need to call multiple stores with the same client?
In my organization, we are also facing the similar kind of Issue. To solve that we have built another wrapper microservice around the openfga sdk. You can also try the same. It will be more flexible for you
👋🏻 Thanks for the offer @gagandeepp. Sorry about this, we feel this issue isn't well defined for hacktoberfest as it requires working on some pieces of the SDK generation that are quite awkward to update.
We've specifically labelled issues that we're looking for help with with the hacktoberfest or good first issue labels if you'd like to take a look through.
Activity
misterflop commentedon Mar 12, 2023
Same issue with delete_store. In the current implemantation, we have to create a specific client_api for every store that we would like to delete.
rhamzeh commentedon Mar 16, 2023
Hi @misterflop
Currently, our SDKs now expect you to generate a new client per store. In the future (as part of openfga/sdk-generator#118) we are exploring offering two different interfaces which would allow us to have one that allows calling one with dynamic storeIds, but I don't expect that to be soon
Can you elaborate on your use-case where you would need to call multiple stores with the same client?
misterflop commentedon May 2, 2023
Hello,
Thank you for your answer.
I see two use cases on my side:
The openFGA API allows to request per store ID. The SDK should ideally have the same contract.
JRudransh commentedon Jan 16, 2024
In my organization, we are also facing the similar kind of Issue. To solve that we have built another wrapper microservice around the openfga sdk. You can also try the same. It will be more flexible for you
gagandeepp commentedon Oct 5, 2024
interested @rhamzeh Please assign
gagandeepp commentedon Oct 8, 2024
@evansims can you please assign this to me?
ewanharris commentedon Oct 18, 2024
👋🏻 Thanks for the offer @gagandeepp. Sorry about this, we feel this issue isn't well defined for hacktoberfest as it requires working on some pieces of the SDK generation that are quite awkward to update.
We've specifically labelled issues that we're looking for help with with the
hacktoberfestorgood first issuelabels if you'd like to take a look through.rhamzeh commentedon Feb 19, 2025
@evansims - can you push a small example commit for this work similar to what @jimmyjames did for the Java SDK here?
StoreIdfrom theOpenFgaApiconfiguration interface sdk-generator#118