Docs? What docs?

I am currently trying to build a real app with DGraph GraphQL. This means past the TODO app etc (Roles, complex deletes, updates, counts, searches… etc). You simply can’t without knowing all DGraph. How do Lambdas Work? How does DQL Work (JSON vs TRIPLES)?

The first big problem I noticed is data modeling. I think I did a full circle on certain subjects to find the answers. There are things I thought impossible that are actually easier, and things I thought possible that are doable with a good or bad hack.

But most everything has a work-around already you just didn’t know. So my question to you… – except the update-after-auth-issue :sneezing_face:

What is missing from the docs?

There are some of us users on discord who are creating articles, websites, etc to help spread the word of Dgraph and to make your life easier…

So, what is missing? What is not easy to find?

I am not looking for solutions on this post, but a list of problems that maybe us DGraph users can help each other with it. This includes all DGraph problems… (not bugs, that is for this forum, but solutions…)

Example Questions?

  • How do you setup graphql in react with dgraph?
  • How do you delete all items in a node?
  • What can’t I do in GraphQL. What are workarounds? What are the best workarounds?
  • Can I run multiple queries in DQL at once?
  • Did anyone read this post this far?

I am not saying these are good questions, just examples… let us other users know where the holes in DGraph documentation are, so we can help fill them in, so the DGraph team can concentrate on programming.

Someone said on the discord server that Dgraph needs to eat its own dog food to know where the problems lie. They need to build an app with their own product. Of course, that is for another topic.

We can at least show you new guys how to get there and more, as we have done it (built apps, contributions, tools, etc). There are problems, but there are solutions too.

Let us know what would be good to read about!

J
(current Dgraph nerd)

1 Like

qq, are those questions to be answered? or it is just retorical?

1 Like

No rhetorical, just looking for any questions people have so we can help write more docs to explain things better. People are saying the docs are not clear and missing items.

J

The best way Apollo GraphQL | Apollo Graph Platform— unify APIs, microservices, and databases into a graph that you can query with GraphQL - They have a React Client. And several tutorials related.

DQL Delete - Mutations (dgraph.io).
You can use Bulk delete - Upsert Block . Control the params to delete only the target.

With Upsert Block(delete) you can do several logics to delete your data. For example, you can do a query to find the target, another to recurse all edges, another to query incoming edges, and so on. In the end, you set up all the variables in the Delete block mutation and done.

GraphQL is autogenated.

That’s a wider question. But in general, using a custom DQL query will solve several problems. But never expose a DQL(a very generic DQL query) to the end-user. This can be exploited.

Yes, Multiple Query Blocks with DQL - Query language multiblocks are fine and they run concurrently.

What do you mean how? Do you need to know deeply how a thing works? This should be a thing for who will work in the core code, right? In terms of performance, they are pretty similar.

I never used, but I think it is simple as it is just a instance running JS.

One thing I personally don’t like in Dgraph’s Docs is that the search box mix GraphQL and DQL and this bothers me, imagine that this confuses the new users. We should separate those.

Maybe the community could create “Community-driven docs”. Get some open-source Docs model out there and build it. The material(queries and so on) already exists, but the way it is shown the users complain a lot. In general, I’m pretty comfortable with the docs, just the search thing bothers me.

I see, that was what I was questioning with “rhetorical”.

We have some. e.g. GitHub - dgraph-io/flock: Twitter on Dgraph

1 Like

Yes!!!

But it is algolia so there is that limitation.

1 Like

Come to think of it, this confused me for a long time. I still run into this issue where I’m trying to figure out how to do something with GraphQL and the search gives me DQL docs which I click without realising.

1 Like

Hey @MichelDiz, I appreciate you answer the questions literally, but that was not the point lol.

I am looking for questions other users might have that are not clear in the docs. There were a lot of complaints about the docs not being clear, so I figure we (the active community members) could help make this better by writing more and clearer docs on certain subjects. I apologize if that was not clear. So again, I ask this question to anyone…

What is missing from the docs?

What subjects do you need to be clearer on?

J

For the documentation, I’suffered the same issue. I guess one quick fix would be to tag somehow the articles in a visual way. Maybe just adding [DQL] TItle of the article and [GQL] Title when an article targets only one of the languages?

Also I thinkg it would be amazing to migrate all that documentation to an app created using dgraph, following the “eat your own cooking” philosofy :sweat_smile:

3 Likes

Great post. I think the documentation could use a boost:

  1. Definitely the difference between GraphQL and DQL is important in docs. Separate in different sub-domains perhaps.
  2. Consistency regarding code examples throughout documentation would be greatly appreciated. Now a mix is used: the JSON way, the RDF way, Curl, JavaScript, …
  3. Consistency also in the Admin section, for example JSON config for Docker, vs inline config.
  4. Ratel works with RDF, but the cloud-interface works with JSON to query. Why?
  5. The Cloud interface allows both GraphQL and DQL. Why? Why not choose your desired API first? Or is there an example why to use both GraphQL and DQL in one app?

Thanks!
Klaas

2 Likes