Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_store should have an optional store_id parameter #9

Open
misterflop opened this issue Mar 12, 2023 · 7 comments
Open

get_store should have an optional store_id parameter #9

misterflop opened this issue Mar 12, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@misterflop
Copy link

misterflop commented Mar 12, 2023

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.

Part of openfga/sdk-generator#118

@misterflop
Copy link
Author

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 rhamzeh added the enhancement New feature or request label Mar 16, 2023
@rhamzeh
Copy link
Member

rhamzeh commented 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
Copy link
Author

Hello,

Thank you for your answer.

I see two use cases on my side:

  • I'm currently implementing a multi tenancy application and I would like to have a store per tenant.
  • For maintenance, if you need to upgrade schema of several stores with the same script.

The openFGA API allows to request per store ID. The SDK should ideally have the same contract.

@JRudransh
Copy link
Contributor

JRudransh commented 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

@rhamzeh rhamzeh moved this to Backlog in SDKs and Tooling Feb 9, 2024
@rhamzeh rhamzeh moved this from Backlog to Ready in SDKs and Tooling Jun 10, 2024
@gagandeepp
Copy link

interested @rhamzeh Please assign

@gagandeepp
Copy link

@evansims can you please assign this to me?

@ewanharris
Copy link
Member

👋🏻 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

No branches or pull requests

5 participants