And in step 3 I encountered error: “Field name is not indexed and cannot be used in functions”
After running the following query:
curl localhost:8080/query -XPOST -d $'{
me(allof("name", "Star Wars")) @filter(geq("release_date", "1980")) {
name
release_date
revenue
running_time
director {
name
}
starring {
name
}
}
}' | python -m json.tool | less
Turns out the docker command: docker run -it -p 9090:8080 -v $(pwd)/dgraph:/dgraph dgraph/dgraph dgraph --bindall true --schema starwars.schema
Should be instead docker run -it -p 9090:8080 -v $(pwd)/dgraph:/dgraph dgraph/dgraph dgraph --bindall --schema starwars.schema with no arguments to --bindall
Curious to why dgraph’s logs didn’t tell me that the arguments were invalid or that no schema has been loaded.
I will add a fix so that we log if the schema was successfully loaded. I found out that docker run command doesn’t play well when you have more than one arguments. The correct way to do this would be