Validate GraphQL Schema
schema.validate_graphql_schema
Overview
You send GraphQL Schema Definition Language as schema text or as named virtual .graphqls files. Squillify parses it with graphql-java under explicit character, token and rule-depth limits, then builds an unexecutable type system so duplicate types and unknown references become diagnostics. This does not run queries, attach resolvers or fetch imports from the network. A successful call costs 2 execution credits.
Agents need an offline GraphQL SDL lint that cannot execute queries or fetch imports.
Reliability
GRAPHQL_SCHEMA_LIMIT_EXCEEDED — trigger: more than 2 MiB, 100 files, 50000 tokens, depth 500 or 500 diagnostics; retryable: no; next: split the schema.
Context footprint
SDL is schema text only. A successful call costs 2 execution credits.
When to use it
When the caller already holds GraphQL SDL text or a bounded set of virtual .graphqls files.
When a live GraphQL endpoint, federation composition or resolver wiring must be checked.
Powered by graphql-java SchemaParser under Squillify ParserOptions. No query execution.
Scope
Non-goals
- Does not execute queries
- Does not attach resolvers or data fetchers
- Does not fetch remote imports or federation supergraphs
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| schema | string | No | GraphQL SDL, 1 through 2097153 characters; runtime accepts at most 2097152. Omit it when sending files. |
| files | array | No | Named virtual .graphqls files, 0 through 101 closed {path, source} objects; runtime accepts at most 100. Omit it when sending schema. |
| allowDescriptions | boolean | No | Whether GraphQL descriptions are kept during parse; omit it for true. |
| maxDiagnostics | integer | No | How many diagnostics to return, 1 through 501; runtime accepts at most 500. Omit it for 500. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | True when the SDL parsed and the type system contained no ERROR diagnostics. |
| typeCount | integer | Yes | How many named types the parser registered. |
| directiveCount | integer | Yes | How many directive definitions the parser registered. |
| diagnostics | array | Yes | Deterministically ordered closed {code, severity, message, path} diagnostics, 0 through 500 entries. |
| truncated | boolean | Yes | True when more diagnostics existed than maxDiagnostics allowed to list. |
| engine | string | Yes | Pinned graphql-java Maven coordinate used for parse and type-system construction. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.validate_graphql_schema","input":{"schema":"type Query { ping: String }"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("schema.validate_graphql_schema", {"schema":"type Query { ping: String }"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| GRAPHQL_SCHEMA_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not execute queries
- Does not attach resolvers or data fetchers
- Does not fetch remote imports or federation supergraphs
- Running GraphQL operations
- Validating federation composition
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "schema.validate_graphql_schema",
"input": {
"schema": "type Query { ping: String }"
}
}Examples
A Query type with a String field is valid
{
"schema": "type Query { ping: String }"
}{
"directiveCount": 0,
"typeCount": 1,
"truncated": false,
"valid": true,
"engine": "com.graphql-java:graphql-java",
"diagnostics": []
}A field that names an undefined type is invalid
{
"schema": "type Query { ping: UnknownType }"
}{
"directiveCount": 0,
"typeCount": 1,
"truncated": false,
"valid": false,
"engine": "com.graphql-java:graphql-java",
"diagnostics": [
{
"code": "GRAPHQL_SCHEMA",
"severity": "ERROR",
"message": "The field type 'UnknownType' is not present when resolving type 'Query' [@1:1]",
"path": "/schema"
}
]
}Recommended use cases
- Lint a GraphQL schema before publishing it
- Catch unknown types and duplicate definitions in modular SDL
Avoid for
- Running GraphQL operations
- Validating federation composition
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.