Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Example: se-ecom-demo@current

Example audit output from running /audit-supergraph se-ecom-demo@current against Apollo's SE Ecom Demo graph.

Graph Overview

Graph ref se-ecom-demo@current
Subgraphs 3 (products, customers, orders)
Total schema size ~15KB across all subgraphs + supergraph
Federation versions v2.0 (products, orders), v2.5 (customers)

Audit Results Summary

Severity Count
P0 (Blocking) 4
P1 (Best Practice) 22
P2 (Recommendation) 14
Total 40

SAF Pillar Scores

Pillar Assessment
Operational Excellence Needs Attention
Security At Risk
Reliability Good
Performance At Risk
Developer Experience Good

Token Usage Estimates

Each audit spawns 3 parallel agent tasks plus orchestrator aggregation. Token counts scale with schema size and number of subgraphs.

Per-Agent Breakdown

Agent Input Tokens Output Tokens Total
@audit-federation ~12,700 ~3,500 ~16,200
@audit-schema-design ~10,300 ~3,600 ~13,900
@audit-access-patterns ~9,400 ~2,600 ~12,000
Orchestrator (aggregate + report) ~15,000 ~4,800 ~19,800
Total (lower bound) ~47,400 ~14,500 ~61,900

Realistic Estimates

The table above shows a conservative lower bound based on file sizes. Actual usage includes Claude's reasoning, tool call overhead, multi-turn interactions within each agent (reading files, running grep, executing rover lint, making API calls), and retry logic. Real usage is typically 2-4x the lower bound.

Scenario Input Output Total
Lower bound (file sizes only) ~47K ~15K ~62K
Typical (3 subgraphs) ~50-80K ~15-25K ~65-105K
Upper bound (complex schemas) ~100K ~30K ~130K

Scaling Factors

Token usage scales approximately linearly with:

  • Number of subgraphs -- each additional subgraph adds ~3-5K input tokens per agent
  • Schema complexity -- more types/fields = more analysis = more reasoning tokens
  • Access patterns agent -- only runs with a graph ref (requires APOLLO_KEY); adds ~12K tokens but provides usage-aware findings

For a production graph with 10+ subgraphs, expect 150-300K total tokens per audit.

Directory Structure

example/
  README.md                          This file
  schemas/
    subgraph-list.txt                Rover subgraph list output
    products.graphql                 Products subgraph schema (3.5KB)
    customers.graphql                Customers subgraph schema (1.4KB)
    orders.graphql                   Orders subgraph schema (0.8KB)
    supergraph.graphql               Composed supergraph schema (8.9KB)
  output/
    audit-federation.json            Federation topology findings (16 findings)
    audit-schema-design.json         Schema design findings (20 findings)
    audit-access-patterns.json       Access patterns findings (9 findings)
    audit-supergraph.json            Aggregated + deduplicated findings (40 findings)
    audit-supergraph.md              Human-readable markdown report

Reproducing This Example

# Requires: rover CLI, APOLLO_KEY environment variable
/audit-supergraph se-ecom-demo@current

Or to audit just the local schema files without GraphOS access:

/audit-supergraph example/schemas/