Hi guys, I wanted to try the remote schema feature but it seems that it doesnt work for local development. First I thought it was an issue with my graphql server written in golang but then I tried with your nodejs boilerplate. When I add a remote schema in the UI I get this error back :
HttpExceptionRequest Request { host = "localhost" port = 4000 secure = False requestHeaders = [("Content-Type","application/json"),("User-Agent","hasura-graphql-engine/v1.0.0-alpha38")] path = "/graphql" queryString = "" method = "POST" proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutDefault requestVersion = HTTP/1.1 } (ConnectionFailure Network.Socket.connect: <socket: 13>: does not exist (Connection refused))
even though I can do an introspection query ... I tried with path "/graphql?" too and with 0.0.0.0 instead of localhost but without success. I guess that hasura remote schema only accepts https. Would it possible to add support for http too for (development purpose)? Is there a workaround that doesn't involve deploy my app? Thank's for the great work guys
@Sach97 This seems like the docker container not being able to connect to the server running on localhost. Can you try using host.docker.internal if you're on a mac or the docker host IP basically?
That should work!
Thank's it worked with my docker host IP! Maybe add some tips to the doc to help future users with local dev ?
@rikinsk Any quickfix ideas for the docs?
In this section, https://docs.hasura.io/1.0/graphql/manual/remote-schemas/index.html#step-2-merge-remote-schema we can add a few pointers on how to connect to a service running on the same host with docker host IP esp for local dev?
Yes. That seems about right
We should also document it in the README here: https://github.com/hasura/graphql-engine/tree/master/install-manifests/docker-compose
I am getting following error in Linux system
msg="apply failed: [remote-schema-error] HTTP exception occurred while sending the request to http://172.17.0.1:8000/graphql
@kalpudada Is your remote schema at http://172.17.0.1:8000/graphql running?
@kalpudada Is your remote schema at http://172.17.0.1:8000/graphql running?
Yes
@kalpudada Can you pls ping me on Discord @Tiru ?
Closing this issue as the OP's request has been done. We have a note explaining what endpoint to use with Docker here: https://docs.hasura.io/1.0/graphql/manual/remote-schemas/index.html#step-2-merge-remote-schema
@kalpudada If you are unable to contact me on Discord, pls open another issue :)
Most helpful comment
@Sach97 This seems like the docker container not being able to connect to the server running on localhost. Can you try using
host.docker.internalif you're on a mac or the docker host IP basically?That should work!