Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of undici to make request to subgraph along with make-fetch-happen #1562

Open
ujjawal-khare opened this issue Mar 3, 2022 · 1 comment

Comments

@ujjawal-khare
Copy link

Undici support should be there since it's more performant as compared to make-fetch-happen,

Benchmarks for undici are given in following link: https://www.npmjs.com/package/undici

@glasser
Copy link
Member

glasser commented Apr 29, 2022

undici should work as a fetcher now. In fact with #1805 we are explicitly switching fetcher to a TypeScript interface which we're explicitly testing matches undici's TypeScript declarations.

That said, while undici is a powerful and flexible HTTP library, its fetch implementation is a lot less flexible — it doesn't let you use any of undici's customizations directly. For example, there is no support for proxies with undici's fetch. So unless we were to rewrite RemoteGraphQLDataSource to use undici's native API directly (which stops you from using any other implementation) we would lose proxy support.

(One could write a separate UndiciGraphQLDataSource that uses the native Undici API too...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants