Whatnot builds a daily AI subagent to eliminate GraphQL schema bloat via automated cleanup PRs
Whatnot's GraphQL schema had accumulated over 2,600 unused fields left behind from old features, making the schema more complex and harder to navigate and introducing risk of accidentally reusing old, unoptimized endpoints. Manual cleanup was impractical because making breaking changes to remove fields is tricky, time-consuming, and risks breaking client experiences.
Static analysis alone could not reliably identify safe-to-delete fields because older mobile app versions may still call queries removed from the main branch, and admin tooling dashboards execute queries entirely outside the primary repositories.
A process that once took an engineer one to two hours per field now takes minutes to review, with the subagent having safely removed 24 of approximately 200 unused root fields at a cost of roughly $1–3 per run in LLM credits, and most PRs requiring no edits at all.
Show all 6 reported metrics
Frequently asked questions
What did this team achieve with this AI workflow?
A process that once took an engineer one to two hours per field now takes minutes to review, with the subagent having safely removed 24 of approximately 200 unused root fields at a cost of roughly $1–3 per run in LLM…
What tools did this team use?
GitHub Action, LLM, Abstract Syntax Tree (AST).
What results were reported?
unused GraphQL fields discovered: over 2,600; Unused root queries and mutations: nearly 200; Unused root fields safely removed: 24 of ~200; Engineer time per field cleanup: from one to two hours per field to minutes to review (source-reported, not independently verified).
What failed first in this deployment?
Static analysis alone could not reliably identify safe-to-delete fields because older mobile app versions may still call queries removed from the main branch, and admin tooling dashboards execute queries entirely outs…
How is this back office ops AI workflow structured?
Traffic pipeline identifies unused fields → Daily GitHub Action triggers cleanup → AI subagent removes unused field → PR created with context and assignment → Code owner reviews and approves.