mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
built-ins: add graph.reachable_paths (#4205)
This new built-in functionality allows callers to find all reachable paths in a graph based on an array or set of root nodes. See the updates to policy-reference.md for more details and usage information. Signed-off-by: Justin Lindh <justin.lindh@webfilings.com>
This commit is contained in:
@@ -979,6 +979,65 @@
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "graph.reachable_paths",
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"of": [
|
||||
{
|
||||
"dynamic": {
|
||||
"type": "any"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"of": {
|
||||
"type": "any"
|
||||
},
|
||||
"type": "set"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"of": [
|
||||
{
|
||||
"dynamic": {
|
||||
"type": "any"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"of": {
|
||||
"type": "any"
|
||||
},
|
||||
"type": "set"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"of": {
|
||||
"dynamic": {
|
||||
"type": "any"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "set"
|
||||
},
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gt",
|
||||
"decl": {
|
||||
|
||||
Reference in New Issue
Block a user