15. A generated client
Customers have been using Shopfront through curl. In this chapter they get a storefront: a React
page that lists the catalogue, places an order, follows its run and lists the customer's orders.
The page calls none of that by hand. It writes the GraphQL documents it needs, and Trax generates
a typed function for each, plus the client that sends them.
This chapter starts from the end of chapter 14. It
needs Node.js 22 or later, as trax machine generate already did.
In this chapter
- How it fits together
- The storefront's place
- The documents
- The hub serves the storefront
- Generate the client
- The page
- Run it
- Keep it current
- Test it
SDK Reference
Generated clients | trax client | Client manifest | Fetch only what a component needs | Run progress