mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
topdown/builtins: Add object support for GraphQL builtins. (#4752)
This commit adds support for AST objects to be usable in place of strings for several of the GraphQL built-in functions, to improve the composability of the GraphQL set of built-ins, and to dramatically reduce the amount of redundant parsing when writing GraphQL policies. Fixes: #4742 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit is contained in:
+102
-6
@@ -1051,10 +1051,42 @@
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"type": "string"
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
@@ -1068,10 +1100,42 @@
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"type": "string"
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
@@ -1109,10 +1173,42 @@
|
||||
"decl": {
|
||||
"args": [
|
||||
{
|
||||
"type": "string"
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
"of": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"dynamic": {
|
||||
"key": {
|
||||
"type": "any"
|
||||
},
|
||||
"value": {
|
||||
"type": "any"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
],
|
||||
"type": "any"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
Reference in New Issue
Block a user