-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add support for specifying a list of tuples to delete #161
Comments
Hello @aaguiarz, few questions: Should be kept the
Also the format accepted by |
Case we decide to ignore those features and follow with json, i have a draft for it already linked with the issue 😄 can you assign this issue to me? |
I don't see a reason why we wouldn't want to have the same features we have in From that perspective, 'tuple write --file' would be equivalent to @rhamzeh what do you think? |
All the commands that accept YAML also accept JSON (though we don't currently document it). For consistency (and ease of use), let's keep aiming for YAML support. So both @aaguiarz, how about we do a breaking change, allow write/delete to accept an array of tuples (also making it consistent with how contextual tuples in check are written): # import one or more tuples, consistent with
fga tuple write --tuple "user:anne writer folder:product" --tuple "folder:product parent document:roadmap" Alongside: fga tuple write --file tuples.{json|yaml} And we drop the default On the other hand, for the future, we need a way to make the CLI work with conditions |
@gabrielbussolo discussed it with @aaguiarz, for this ticket:
This means supporting the same options import currently supports:
We also need to do the same for We'll create a separate issue for reading from STDIN in write and delete |
If we want to delete all the tuples in a store, we can currently doing by running
Running the CLI to delete each tuple is not efficient, in particular when the OpenFGA store uses OAuth authentication and requires obtaining a token in each call.
We should add an option to get the tuples to delete from a file:
fga tuple delete --file tuples.json
That would be slightly inconsistent with our current
fga tuple import
option, so we might want to also supportfga tuple write --file tuples.json
and deprecate
fga tuple import
.The text was updated successfully, but these errors were encountered: