You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
GraphQL mesh is a fantastic tool for combining multiple datasources. But not all datasources can generate a response in a reasonable time.
If I want to query data from let's say 4 different sources in 1 query, and 3 of the data sources all fetch the data within 200ms. But one Data source takes 4 seconds to fetch, I'm stuck waiting for all of my data for 4 full seconds even though some of it was ready much sooner.
GraphQL already has a solution for this called @defer and @stream directives, and I can't think of any place more important to implement support for this than in a graphQL gateway. I was actually quite surprised to not see it mentioned in the docs.
GraphQL Mesh uses GraphQL js which doesn't support defer and stream and we also use schema stitching that needs to be aware of defer/stream usage. graphql/graphql-js#2839 ardatan/graphql-tools#1941
Is your feature request related to a problem? Please describe.
GraphQL mesh is a fantastic tool for combining multiple datasources. But not all datasources can generate a response in a reasonable time.
If I want to query data from let's say 4 different sources in 1 query, and 3 of the data sources all fetch the data within 200ms. But one Data source takes 4 seconds to fetch, I'm stuck waiting for all of my data for 4 full seconds even though some of it was ready much sooner.
GraphQL already has a solution for this called @defer and @stream directives, and I can't think of any place more important to implement support for this than in a graphQL gateway. I was actually quite surprised to not see it mentioned in the docs.
You can read more about it from this post from 2020: https://graphql.org/blog/2020-12-08-improving-latency-with-defer-and-stream-directives/
@defer and @stream directives are already implemented in competing technologies like apollo-server since 2018 (4 years ago)
Please consider adding this to graphql-mesh. It will be a huge performance boost for many use cases.
See apollo-server @defer implementation: https://www.apollographql.com/blog/community/backend/introducing-defer-in-apollo-server/
The text was updated successfully, but these errors were encountered: