3 ms·
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 p
by Omerd6 3y 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
- yashap 3y agoIt absolutely does, and this has been a significant issue when I’ve used GQL.
- akio 3y agoYou 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/defer-stream https://the-guild.dev/graphql/yoga-server/docs/features/defe... https://www.apollographql.com/docs/router/executing-operations/defer-support https://www.apollographql.com/docs/router/executing-operatio... Client side: https://www.apollographql.com/docs/react/data/defer https://www.apollographql.com/docs/react/data/defer https://relay.dev/docs/next/glossary/#defer https://relay.dev/docs/next/glossary/#defer