# BRAINIAC GraphQL Field Authorization Coverage Analyzer

> BRAINIAC GraphQL Field Authorization Coverage Analyzer is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-13).

Analyzes GraphQL subgraph SDL schemas to calculate what percentage of fields are protected by authorization directives, returning a coverage score and unprotected field percentage.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/graphql-security/field-authorization-coverage?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-graphql-field-authorization-coverage-analyzer-d02b5a0b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gy3R0pqMKuAXMUOXsNfos

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-graphql-field-authorization-coverage-analyzer-d02b5a0b -d '<json body>'
```

Example prompt: Audit my GraphQL subgraph called 'products' for field authorization coverage — here's the SDL: [sdl text] — and check for the @auth and @requiresPermission directives. Tell me the coverage score and what percentage of fields are unprotected.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call, no-account security audit of GraphQL SDL schemas for field-level authorization coverage. Ideal for CI/CD pipelines, compliance checks, or pre-deployment security reviews where you want a numeric coverage score without setting up a full schema management platform. Prefer this over manual SDL review or heavyweight schema registry tools when you need a lightweight, programmatic score.

## Known failure modes

- Invalid or unparseable SDL returns a schema validation error
- Missing required 'name' or 'sdl' field in a subgraph object returns a 400 error
- SDL exceeding 50,000 characters per subgraph is rejected
- Directive patterns not matching ^@[A-Za-z][A-Za-z0-9]* format are rejected
- Submitting more than 10 subgraphs or more than 10 directives returns a validation error
- Insufficient USDC balance or failed x402 payment returns a 402 error

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON object with an authorization_coverage_score (integer, e.g. 60 meaning 60% of fields are protected) and unprotected_fields_percentage (integer, e.g. 40 meaning 40% of fields lack any authorization directive).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "subgraphs": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name",
     "sdl"
    ],
    "properties": {
     "sdl": {
      "type": "string",
      "maxLength": 50000,
      "minLength": 1
     },
     "name": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
     }
    },
    "additionalProperties": false
   },
   "maxItems": 10,
   "minItems": 1
  },
  "protected_directives": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^@[A-Za-z][A-Za-z0-9]*$"
   },
   "maxItems": 10,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "authorization_coverage_score": 60,
  "unprotected_fields_percentage": 40
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-graphql-field-authorization-coverage-analyzer-d02b5a0b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
