-
Notifications
You must be signed in to change notification settings - Fork 243
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
federation: node-fetch in @apollo/gateway doesn't support unix: urls #333
Comments
I might be able to switch to TLS over TCP, but I'll need to be able to pass |
Hey @lennyburdette! We are working on a way to provide the service definitions files instead of having to the do the fetch at startup. That plus providing a custom datasource should be enough for y'all yes? |
@jbaxleyiii That would probably do it! I'm blocked on building out a proof-of-concept for now, but it's good to know there's an alternative in the works. If fetching the |
closing this as super old! i'm pretty sure i figured it out, and we use make-fetch-happen now anyway. |
Version:
@apollo/gateway
@0.6.6Description:
We use an envoy sidecar process to manage service-to-service routing. All requests go to the same unix socket and we add headers to tell envoy which service cluster to route to.
Currently, this cannot work because
getServiceDefinitionsFromRemoteEndpoint
in@apollo/gateway
uses node-fetch, which throws this error:Only HTTP(S) protocols are supported
.We use unix sockets because we can chown the socket and restrict access to it, unlike a tcp port. If we used TCP we'd have to also use TLS, which is overhead and complexity we'd like to avoid.
Adding support for unix sockets in node-fetch is marked as "wontfix".
I would suggest the got library, which has the same API, but it has 58 transitive dependencies compared to node-fetch's zero. 😬
The text was updated successfully, but these errors were encountered: