back_office_ops · ecommerce · workflow

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.

How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · Traffic pipeline identifies unused fields
A pipeline parsed 30 days of queries, deduplicated traffic by unique query hashes, and traversed the schema's Abstract Syntax Tree (AST) to record every field visit.
Tools used
GitHub ActionLLMAbstract Syntax Tree (AST)
Outcome

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.

What failed first

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.

Results
Time savedfrom one to two hours per field to minutes to review
Volumeover 2,600
Cost replaced$1–3
Source

https://medium.com/whatnot-engineering/eliminating-graphql-schema-bloat-with-ai-so-you-dont-have-to-5f6ae84d0ee1

How we source this →

Grounding & classification
Source type: technical build writeup
27 fields verified against source quotes.
agentic workflowcode diff prfailure mode describedhuman review describedmetric backednamed customerproduction runtime claimedtools describedworkflow describedecommercesoftwareautomation rateemployee productivitytime savedtechnical build writeupback office opsquality assuranceagentic task executionai draft human approval