Post
It lets the server send the fast, urgent parts of a response to the client right away, while slow fragments stream in later. Still one single operation.
0 reposts0 likes
And you can do this in Fastify land now. Mercurius v16.12.0 just shipped defer support for incremental delivery, alongside GraphQL 17. github.com/mercurius-js...
github.comGitHub - mercurius-js/mercurius: Implement GraphQL servers and gateways with FastifyImplement GraphQL servers and gateways with Fastify - mercurius-js/mercurius
Watch @jeff.auriemma.xyz break it down. He built an e-commerce storefront to show it. One slow field- product recommendations- held up the whole page. LCP was 4.1 seconds. Adding defer to the reviews and recommendations fragments dropped LCP to 1.1 seconds. 👉 youtu.be/jAV2evYLmXM
youtu.beYou should know about @defer in GraphQLBig Queries don't have to mean Slow Queries. Use the @defer directive to get your fastest and highest-urgency data on the screen faster without giving up the elegance that GraphQL offers.