apollo-feature-requests icon indicating copy to clipboard operation
apollo-feature-requests copied to clipboard

Incrementally render results when using `@defer` with `client.mutate`

Open alessbell opened this issue 2 years ago • 1 comments

See original comment here.

When @defer support was originally added to Apollo Client's client.mutate API via https://github.com/apollographql/apollo-client/pull/10368, the existing design (returning a Promise that resolves with a single value) prevented incremental chunks from being rendered as they're delivered.

Instead, the result is assembled and resolved after the final chunk is delivered, effectively erasing the benefit of @defer.

This is a feature request for a client.mutate API which allows multipart responses to be consumed as each multipart chunk arrives.

alessbell avatar Jul 31 '23 18:07 alessbell