This summer at Meta, I worked on internal tooling for Hack (Meta’s PHP dialect) and GraphQL. One of my main projects was tackling a performance issue in the Agent Connect UI that had been bugging the team for a while.
Agent Connect is an internal tool at Meta, and the UI was making redundant GraphQL queries—way more than necessary. This wasn’t just a performance issue; it made the codebase harder to reason about and maintain. When I dug into it, I found queries being triggered multiple times for the same data, sometimes on the same page render.
The question was: how do we fix this without breaking existing functionality?
I started by instrumenting the codebase to track where queries were being called. GraphQL is great for fetching exactly what you need, but it’s also easy to accidentally over-fetch or duplicate queries when components don’t share data properly.
After analyzing the query patterns, I discovered:
I refactored the query logic to consolidate redundant calls. This involved:
Moving queries up the component tree - Instead of each component making its own query, I moved shared queries to parent components and passed data down through props.
Implementing better caching - GraphQL has built-in caching, but you need to structure your queries properly to take advantage of it. I normalized some of the query keys so the cache could recognize duplicate requests.
Batching related queries - Instead of making three separate queries for user data, permissions, and settings, I combined them into a single optimized query.
The result? 36% reduction in GraphQL queries. Pages loaded faster, and the code became much cleaner.
Working at Meta’s scale taught me a few things:
This was just one of many projects I worked on during my internship. I also led development of a Case Audit AI Internal Tool, which used LLM API calls for transcript analysis. That project involved designing the UI prototype, integrating the APIs, and gathering feedback from the team to iterate on features.
Overall, I delivered over 70 diffs during my time at Meta—completing all assigned milestones ahead of schedule and taking on two additional projects outside the intern scope.
The fast-paced environment at Meta pushes you to think critically about every line of code. When you’re working at that scale, small inefficiencies get amplified. It’s not just about writing code that works—it’s about writing code that scales.
Tech Stack: Hack (PHP), GraphQL, React
Impact: 36% reduction in redundant queries, improved page load times