matthewp / astro-fastify

A Fastify adapter for Astro
62 stars 16 forks source link

Add response iterator #11

Closed jbanety closed 2 years ago

jbanety commented 2 years ago

Hi @matthewp,

Sometimes Astro sends a ReadableStream as a response and it raise an error TypeError: body is not async iterable.

I added a function to get a response iterator from different response types (sourced from apollo-client).

With this, Fastify can handle all the Astro response types.

matthewp commented 2 years ago

Great, thanks for the fix!