openfga / cli

A cross-platform CLI to interact with an OpenFGA server
https://openfga.dev
Apache License 2.0
50 stars 25 forks source link

Support importing assertions along with the store #224

Open poovamraj opened 10 months ago

poovamraj commented 10 months ago

Currently we support importing a store file using

fga import store --file=store.fga.yaml

But this doesn't import the assertions present along with the store.

Importing the assertions can be helpful to be accessed from the playground and do the checks.

rhamzeh commented 9 months ago

Blocked by:

KamalAman commented 7 months ago

I would also love a fga model test --upload command to upload the assertions into the playground

sujitha-av commented 2 weeks ago

Hey all, when we are talking about importing assertions, it is only the check assertions right? since that is the only type that can be created/accessed from the playground.

aaguiarz commented 2 weeks ago

Yes, you'd convert check tests to assertions.

sujitha-av commented 2 weeks ago

Yes, you'd convert check tests to assertions.

Yes, but then there are other assertion types too like the listObjects and listUsers assertions. Do we import them too

  1. They are not supported in the playground
  2. The WriteAssertions API only supports check assertions. Should we do this first and support the other types of assertions too?
aaguiarz commented 2 weeks ago

No, they should be ignored for now. We should only import assertions for Check