Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 131 forks source link

Resolver Failed to fetch from local api #446

Open marktani opened 6 years ago

marktani commented 6 years ago

Issue by kdichev Tuesday Dec 26, 2017 at 21:56 GMT Originally opened as https://github.com/graphcool/prisma/issues/1455


I have added a custom variable in graphcoo.yml to set API_URL variable according to dev or prod.

When I try to fetch with a resolver function from local cluster I get error:

"message":"request to http://localhost:60000/simple/v1/LOCAL_ID failed, reason: connect ECONNREFUSED 127.0.0.1:60000"

Playground does fetch data from localhost accordingly but the serverless function does not

graphcool/graphcool-dev:0.11.0 "/app/bin/single-s..." 0.0.0.0:60000->60000/tcp local_graphcool_1 graphcool/localfaas:0.11.0 "/app/bin/localfaas" 0.0.0.0:60050->60050/tcp local_localfaas_1 mysql:5.7 "docker-entrypoint..." 3306/tcp local_graphcool-db_1

edit:

From my front-end application I can call a query but when the serverless function tries to connect to local db it fails