I’ve been reading documentation, tutorials and watching some videos from Youtube related to the Dgraph. However, I’m not sure if the Dgraph is the correct solution in our case.
We are building a relatively small graph where each Node has the same properties; name, type, and UUID. The information is coming from a third-party system and we have no control if and when new types are added.
As an example of we could have the following:
[type:City, name:RandomVille]->[type:building, name:“Factory”]->[type: machine, name:BS-generator]->[type:temperature, name:“Temperature”]
There could be multiple cities and buildings in a city, with multiple machines and maybe even machine parts, etc.
And we would like to make queries such as:
Retrieve all “temperature” type nodes connected to this city, etc.
When I watched the first introduction videos (from the year 2019?), I was thinking that the Dgraph would be suitable for this project. But after researching, I’m not so sure anymore.
By my understanding using GraphQL is not suitable for this type of purpose, because it is strongly typed. The DQL might be suitable for getting connections like this, but it is not recommended for public use:
When you don’t want to give your clients access to drop your database or alter your schema.
When you need to restrict access control at the object level. (Enterprise users have access control at the predicate level within DQL)
Above bullet points are taken from the GraphQL vs DQL blog post:
[GraphQL vs DQL - Dgraph Blog]
We are planning to provide this information to other organizations, probably by using an API key, but you cannot trust that the keys will stay safe. It might be possible to block requests against “mutation” endpoint, but I’m not sure if this is enough?,
Dgraph has many use cases, but is it suitable for our case and if not, does anyone have idea where to look next?
When I made some final edits before posting, I accidentally removed the GraphQL vs DQL reference.
Edited the original post by adding reference to the post.