Skip to main content

How to call procedures

You can use the methods call() and yield_() to construct queries that will call procedure and return results from them.

  • call(procedure: str, arguments: Optional[str] = None) - Call the procedure procedure with the arguments arguments.
  • yield_(results: Optional[Dict[str, str]]) - Yield results from a procedure with aliases formatted as key AS value.

Call procedure with no arguments

To call a procedure with no arguments, don't specify the arguments in the call() method:

from gqlalchemy import Call

query = Call("pagerank.get").yield_().return_().execute()

Call procedure with arguments

To call a procedure with arguments, specify the arguments as a string in the call() method:

from gqlalchemy import Call

query = Call("json_util.load_from_url", "https://some-url.com")
.yield_(results="objects")
.return_(results="objects")
.execute()