I've setup a Dgraph using the docker version. I'm currently able to manipulate the schema and query the graph using Ratel (dgraphs' official tooling); but I want to be able to connect to my graph using Apollo Studio. I tried http://localhost:8080 and http://localhost:8080/graphql in the apollo studio but it can't connect. It was said somewhere in their forum that I need to setup apollo server in front of the dgraph to be able to use apollo studio. Can someone guide me on the steps needed to do so?
Asked
Active
Viewed 129 times
0
-
It might be a security issue. Did you set any whitelist in your docker config? – Cetin Basoz Aug 23 '22 at 00:03
1 Answers
0
Here is the docker-compose.yaml that I use:
version: "3.2"
services:
zero:
image: dgraph/dgraph:latest
volumes:
- d:/dgraph:/dgraph
ports:
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --my=zero:5080
alpha:
image: dgraph/dgraph:latest
volumes:
- d:/dgraph:/dgraph
ports:
- 8080:8080
- 9080:9080
restart: on-failure
command: dgraph alpha --my=alpha:7080 --zero=zero:5080 --security whitelist=0.0.0.0/0
ratel:
image: dgraph/ratel:latest
ports:
- 8000:8000
command: dgraph-ratel
Here whitelist=0.0.0.0/0 which I wouldn't leave it like that but this is a temporary test environment for me.
And in apollo (https://studio.apollographql.com/sandbox/explorer) I can use:
http://localhost:8080/graphql
http://localhost:8080/admin
Note: In my case I use local d:\DGraph for dgraph data folder.

Cetin Basoz
- 22,495
- 3
- 31
- 39