ast+topdown: Add graphql.schema_is_valid builtin. (#5296)

This commit adds a new GraphQL builtin for validating GraphQL schemas,
applying stronger validation rules than what the current GraphQL parsing
builtins apply by default.

Fixes: #5125

Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
This commit is contained in:
Philip Conrad
2022-10-27 08:59:18 -04:00
committed by GitHub
parent 9a597feb2e
commit 6ec07cabfb
5 changed files with 860 additions and 1 deletions
+30
View File
@@ -1288,6 +1288,36 @@
"type": "function"
}
},
{
"name": "graphql.schema_is_valid",
"decl": {
"args": [
{
"of": [
{
"type": "string"
},
{
"dynamic": {
"key": {
"type": "any"
},
"value": {
"type": "any"
}
},
"type": "object"
}
],
"type": "any"
}
],
"result": {
"type": "boolean"
},
"type": "function"
}
},
{
"name": "gt",
"decl": {