Loading 1million.rdf.gz results in empty data - what am I doing wrong?

Following the instructions in the DQL tour, everything seems to go well. The schema shows up in Ratel. The live loader grinds for 30 seconds or so & reports success.

Then, every query gives an empty result, both in GraphQL and DQL. And Ratel’s “Usage Stats” all show zeroes across every predicate in the schema. Is there something I’m probably missing? Some namespace or database selection issue or something?

I’ve tried this on both standalone & separate containers, plus using docker-compose with separate containers. Same result.

Thanks in advance.

Example query ```bash $ doc exec alpha curl -X POST http://localhost:8080/graphql -H "Content-Type: application/graphql" -d $' 10:55:26 query { queryDirector(first: 3) { name } } ' | python -m json.tool { "data": { "queryDirector": [] }, "extensions": { "tracing": { "duration": 2142300, "endTime": "2021-04-14T14:55:37.4516603Z", "execution": { "resolvers": [ { "dgraph": [ { "duration": 1838200, "label": "query", "startOffset": 291800 } ], "duration": 1907400, "fieldName": "queryDirector", "parentType": "Query", "path": [ "queryDirector" ], "returnType": "[Director]", "startOffset": 225400 } ] }, "startTime": "2021-04-14T14:55:37.449518Z", "version": 1 } } } ```

This is a GraphQL query. It will never work cuz that dataset is DQL only. If you are learning GraphQL via the Tour. You should stick to the GraphQL lessons. And not mix the topics.

We could in the future make it work in GraphQL. But it needs a ton of changes in the dataset.

1 Like

I understand now, thanks! Only after your answer and the docs on GraphQL on existing Dgraph did this become clear. Should the docs maybe delineate the differences between using GraphQL and DQL? I think the GraphQL schema wrapper is a tiny bit more opinionated than it might appear at first glance. That you’d be making a choice to commit to DQL until you explicitly migrate to a GraphQL schema wasn’t clear to me.

Aaaand just found this forum post delineating exactly this. I guess I didn’t look hard enough :wink:

2 Likes