Client#

class raphtory.graphql.RaphtoryClient(url)#

Bases: object

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

Methods:

copy_graph(path, new_path)

Copy graph from a path path on the server to a new_path on the server

delete_graph(path)

Delete graph from a path path on the server

is_server_online()

Check if the server is online.

move_graph(path, new_path)

Move graph from a path path on the server to a new_path on the server

new_graph(path, graph_type)

Create a new Graph on the server at path

query(query[, variables])

Make a graphQL query against the server.

receive_graph(path)

Receive graph from a path path on the server

remote_graph(path)

Get a RemoteGraph reference to a graph on the server at path

send_graph(path, graph[, overwrite])

Send a graph to the server

upload_graph(path, file_path[, overwrite])

Upload graph file from a path file_path on the client

copy_graph(path, new_path)#

Copy graph from a path path on the server to a new_path on the server

Parameters:
  • path (*) – the path of the graph to be copied

  • new_path (*) – the new path of the copied graph

Returns:

Copy status as boolean

delete_graph(path)#

Delete graph from a path path on the server

Parameters:

path (*) – the path of the graph to be deleted

Returns:

Delete status as boolean

is_server_online()#

Check if the server is online.

Returns:

Returns true if server is online otherwise false.

move_graph(path, new_path)#

Move graph from a path path on the server to a new_path on the server

Parameters:
  • path (*) – the path of the graph to be moved

  • new_path (*) – the new path of the moved graph

Returns:

Move status as boolean

new_graph(path, graph_type)#

Create a new Graph on the server at path

Parameters:
  • path (*) – the path of the graph to be created

  • graph_type (*) – the type of graph that should be created - this can be EVENT or PERSISTENT

Returns:

None

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.

receive_graph(path)#

Receive graph from a path path on the server

Parameters:

path (*) – the path of the graph to be received

Returns:

Graph as string

remote_graph(path)#

Get a RemoteGraph reference to a graph on the server at path

Parameters:

path (*) – the path of the graph to be created

Returns:

RemoteGraph

send_graph(path, graph, overwrite=False)#

Send a graph to the server

Parameters:
  • path (*) – the path of the graph

  • graph (*) – the graph to send

  • overwrite (*) – overwrite existing graph (defaults to False)

Returns:

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

upload_graph(path, file_path, overwrite=False)#

Upload graph file from a path file_path on the client

Parameters:
  • path (*) – the name of the graph

  • file_path (*) – the path of the graph on the client

  • overwrite (*) – overwrite existing graph (defaults to False)

Returns:

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