Content Deep Dive
Native code generation at Facebook
Blog post from Apollo
Post Details
Company
Date Published
Author
Sashko Stubailo
Word Count
1,268
Language
English
Hacker News Points
-
Summary
The native code generation tools at Facebook are designed to help developers build productivity-enhancing tools on top of GraphQL. These tools take a description of the type system and a set of GraphQL queries as an input, and output a set of response models and query requests. The tools use a fragment-based model approach, which allows for more modular and maintainable code. This approach enables developers to easily catch fetching errors at compile time, rather than runtime. The tools are built on top of the open-source JavaScript GraphQL reference implementation and have been used by Facebook's engineers since 2012.