Is there a way to interact between Ratel and PyDgraph?

I am using PyDgraph client for development, I would like to know if it is possible to read the queries and mutations from Ratel on PyDgraph which I plan to use to impose restrictions on user’s ability to give different types of mutation.

No, it is not possible. Ratel is a React application. If there’s a way to do this, please share how.

Do you mean copy query text as a string for use in a script with pydgraph module that you run from the command line, or running the same query in Ratel, but using the pydgraph module instead?

I meant giving a mutation in Ratel and reading same mutation input from Python end and do operations based on the mutation given in the back end.

What @MichelDiz is true in that case, Ratel is just another client like the python library, so this wouldn’t be directly supported.

I thought of some pointers on how one could approach this:

  • api server (such as flask) that receives requests from ratel, applies any policy, sends approved mutations to backend dgraph service (such as localhost)
  • reverse proxy (such as nginx) to route requests to your api service (e.g. flask) as entry point, localhost requests received normally.
1 Like