Improvements to the OpenFGA Language (mixed operators are here!) #244
rhamzeh
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've recently rolled out a few improvements to the language that we hope you'll find useful:
map
andlist
are now allowed again as relation namesThe updated language is supported on the latest versions of the CLI, VS Code extension and the FGA Playground.
Let us know if you have any feedback, suggestions or encounter any issues!
1. ➕ Mixed operator support
Many asked for it (including us!), and at long last, mixed operator support has been added to the OpenFGA DSL!
The following are now valid:
define viewer: ([user] but not blocked) or owner or viewer from parent
define viewer: (([user, user:*, user#follower with condition] but not blocked) or (guest and allowed) or owner) and viewer from parent
Some restrictions remain still:
You can read about some of the still unsupported scenarios here. If you have any feedback on the unsupported cases, do tell us what you think!
2. 💬 Improved support for comments
Our previous support for comments was flaky at best. In the latest releases, we're considering any lines that start with
#
(may have 0 or more preceding spaces) to be a comment, and the last portion of a line a comment if it starts with at least one space followed by a#
3. 🗺️
map
andlist
are now allowed again as relation namesWhen we first introduced conditions, we had included a few identifiers (like
map
andlist
) as parameter types for the condition, which blocked their use as relation names.Now, they are being correctly handled and you can use them as names for your relations all over the place!
Beta Was this translation helpful? Give feedback.
All reactions