Hacker News new | ask | show | jobs
by Omerd6 884 days ago
does merging all of your api calls to a single one means that the slowest request is a bottle neck?

when splitting your request the user can view his profile picture before the main content finished loading. this cam hurt user experience

2 comments

You can specify parts of a query should be sent in subsequent responses with the @defer directive, and your client and server libraries will handle the rest for you.

Server side:

https://the-guild.dev/graphql/yoga-server/docs/features/defe...

https://www.apollographql.com/docs/router/executing-operatio...

Client side:

https://www.apollographql.com/docs/react/data/defer

https://relay.dev/docs/next/glossary/#defer

It absolutely does, and this has been a significant issue when I’ve used GQL.