Client#

class raphtory.graphql.RaphtoryClient(url)#

Bases: object

A client for handling GraphQL operations in the context of Raphtory.

Methods:

load_graphs_from_path(path[, overwrite])

Set the server to load all the graphs from its path path.

query(query[, variables])

Make a graphQL query against the server.

send_graph(name, graph)

Send a graph to the server.

wait_for_online([millis])

Wait for the server to be online.

load_graphs_from_path(path, overwrite=False)#

Set the server to load all the graphs from its path path.

Parameters:
  • path (*) – the path to load the graphs from.

  • overwrite (*) – whether or not to overwrite existing graphs (defaults to False)

Returns:

The data field from the graphQL response after executing the mutation.

query(query, variables=None)#

Make a graphQL query against the server.

Parameters:
  • query (*) – the query to make.

  • variables (*) – a dict of variables present on the query and their values.

Returns:

The data field from the graphQL response.

send_graph(name, graph)#

Send a graph to the server.

Parameters:
  • name (*) – the name of the graph sent.

  • graph (*) – the graph to send.

Returns:

The data field from the graphQL response after executing the mutation.

wait_for_online(millis=None)#

Wait for the server to be online.

Parameters:

millis (*) – the minimum number of milliseconds to wait (default 5000).