This repo serves as a quick start for spinning up a dgraph cluster, updating a schema and loading data. Everything's
done with make, the only other requirement is Docker and optionally jq.
- Docker
- make
- curl (optional, for queries from the command line)
- gql (optional, for graphql queries, download from here)
- jq (optional, for queries from the command line)
-
Clone this repo. It's possible I've created a branch for some issue we're collaborating on. If so, check out the branch for the issue.
-
Spin up the cluster
make up
- Then in another terminal, load the schema
make schema
- Load the sample data
make load-data
- If there's some DQL query or mutation that needs to be applied for debugging/testing (this command loads the query in
query.dql)
make query-dql | jq
- If there's a graphql query or mutation that needs to be applied for debugging/testing (this command loads the query in
query.gqlandvariables.json)
make query-gql | jq
Alternatively, you can pop the content of those files into your favorite GraphQL client, use the http://localhost:8080/graphql endpoint.