diff --git a/docs/reference/graphql/graphql_API.md b/docs/reference/graphql/graphql_API.md
index b244c9d83f..2d11fddcc2 100644
--- a/docs/reference/graphql/graphql_API.md
+++ b/docs/reference/graphql/graphql_API.md
@@ -161,7 +161,7 @@ Returns:: Base64 url safe encoded string
MutationPlugin! |
-Returns a plugin.
+Returns a collection of mutation plugins.
|
@@ -247,7 +247,7 @@ This applies to both the graph namespace and new graph namespace.
String! |
-Upload graph file from a path on the client.
+Upload a graph file from a path on the client using GQL multipart uploading.
Returns::
name of the new graph
@@ -333,7 +333,7 @@ name of the new graph
| Boolean! |
-Creates search index.
+(Experimental) Creates search index.
|
@@ -387,7 +387,7 @@ Returns a list of collection objects.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount. The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -449,7 +449,7 @@ Returns a list of collection objects.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount. The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -511,7 +511,7 @@ Returns a list of collection objects.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount. The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -571,7 +571,7 @@ Return a view of Edge containing only the default edge layer.
Edge! |
-Returns a view of Edge containing all layers in the list of names .
+Returns a view of Edge containing all layers in the list of names.
Errors if any of the layers do not exist.
@@ -587,7 +587,7 @@ Errors if any of the layers do not exist.
| Edge! |
-Returns a view of Edge containing all layers except the excluded list of names .
+Returns a view of Edge containing all layers except the excluded list of names.
Errors if any of the layers do not exist.
@@ -672,7 +672,9 @@ An expanding window is a window that grows by step size at each iteration.
| Edge! |
-Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+
+For persistent graphs, any edge which exists at any point during the window will be included. You may want to restrict this to only edges that are present at the end of the window using the is_valid function.
|
@@ -691,7 +693,7 @@ Creates a view of the Edge including all events between the specified start (i
Edge! |
-Creates a view of the Edge including all events at a specified time .
+Creates a view of the Edge including all events at a specified time.
|
@@ -714,7 +716,7 @@ Returns a view of the edge at the latest time of the graph.
Edge! |
-Creates a view of the Edge including all events that have not been explicitly deleted at time.
+Creates a view of the Edge including all events that are valid at time.
This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
@@ -730,7 +732,7 @@ This is equivalent to before(time + 1) for Graph and at(time) for PersistentGrap
| Edge! |
-Creates a view of the Edge including all events that have not been explicitly deleted at the latest time.
+Creates a view of the Edge including all events that are valid at the latest time.
This is equivalent to a no-op for Graph and latest() for PersistentGraph.
@@ -741,7 +743,7 @@ This is equivalent to a no-op for Graph and latest() for PersistentGraph.
| Edge! |
-Creates a view of the Edge including all events before a specified end (exclusive).
+Creates a view of the Edge including all events before a specified end (exclusive).
|
@@ -755,7 +757,7 @@ Creates a view of the Edge including all events before a specified end (exclus
Edge! |
-Creates a view of the Edge including all events after a specified start (exclusive).
+Creates a view of the Edge including all events after a specified start (exclusive).
|
@@ -769,7 +771,7 @@ Creates a view of the Edge including all events after a specified start (exclu
Edge! |
-Shrinks both the start and end of the window.
+Shrinks both the start and end of the window.
|
@@ -788,7 +790,7 @@ Shrinks both the start and end of the window.
Edge! |
-Set the start of the window.
+Set the start of the window.
|
@@ -802,7 +804,7 @@ Set the start of the window.
Edge! |
-Set the end of the window.
+Set the end of the window.
|
@@ -816,7 +818,7 @@ Set the end of the window.
Edge! |
-Takes a specified selection of views and applies them in order given
+Takes a specified selection of views and applies them in given order.
|
@@ -1028,7 +1030,7 @@ Returns: boolean
Boolean! |
-Checks if the edge is on the same node.
+Returns true if the edge source and destination nodes are the same.
Returns: boolean
@@ -1113,7 +1115,7 @@ Returns the list of metadata schemas for edges connecting these types of nodes
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
|
@@ -1158,7 +1160,7 @@ will be returned.
Edges! |
-Return a view of Edge containing only the default edge layer.
+Returns a collection containing only edges in the default edge layer.
|
@@ -1167,7 +1169,7 @@ Return a view of Edge containing only the default edge layer.
Edges! |
-Returns a view of Edge containing all layers in the list of names.
+Returns a collection containing only edges belonging to the listed layers.
|
@@ -1181,7 +1183,7 @@ Returns a view of Edge containing all layers in the list of names.
Edges! |
-Returns a view of Edge containing all layers except the excluded list of names.
+Returns a collection containing edges belonging to all layers except the excluded list of layers.
|
@@ -1195,7 +1197,7 @@ Returns a view of Edge containing all layers except the excluded list of names.
Edges! |
-Returns a view of Edge containing the specified layer.
+Returns a collection containing edges belonging to the specified layer.
|
@@ -1209,7 +1211,7 @@ Returns a view of Edge containing the specified layer.
Edges! |
-Returns a view of Edge containing all layers except the excluded layer specified.
+Returns a collection containing edges belonging to all layers except the excluded layer specified.
|
@@ -1225,6 +1227,8 @@ Returns a view of Edge containing all layers except the excluded layer specified
Creates a WindowSet with the given window duration and optional step using a rolling window. A rolling window is a window that moves forward by step size at each iteration.
+Returns a collection of collections. This means that item in the window set is a collection of edges.
+
@@ -1244,6 +1248,8 @@ Creates a WindowSet with the given window duration and optional step using a rol
Creates a WindowSet with the given step size using an expanding window. An expanding window is a window that grows by step size at each iteration.
+Returns a collection of collections. This means that item in the window set is a collection of edges.
+
@@ -1256,7 +1262,7 @@ Creates a WindowSet with the given step size using an expanding window. An expan
| Edges! |
-Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
|
@@ -1275,7 +1281,7 @@ Creates a view of the Edge including all events between the specified start (i
Edges! |
-Creates a view of the Edge including all events at a specified time .
+Creates a view of the Edge including all events at a specified time.
|
@@ -1294,7 +1300,7 @@ Creates a view of the Edge including all events at a specified time .
Edges! |
-Creates a view of the Edge including all events that have not been explicitly deleted at time. This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
+Creates a view of the Edge including all events that are valid at time. This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
|
@@ -1308,7 +1314,7 @@ Creates a view of the Edge including all events that have not been explicitly de
Edges! |
-Creates a view of the Edge including all events that have not been explicitly deleted at the latest time. This is equivalent to a no-op for Graph and latest() for PersistentGraph.
+Creates a view of the Edge including all events that are valid at the latest time. This is equivalent to a no-op for Graph and latest() for PersistentGraph.
|
@@ -1317,7 +1323,7 @@ Creates a view of the Edge including all events that have not been explicitly de
Edges! |
-Creates a view of the Edge including all events before a specified end (exclusive).
+Creates a view of the Edge including all events before a specified end (exclusive).
|
@@ -1331,7 +1337,7 @@ Creates a view of the Edge including all events before a specified end (exclus
Edges! |
-Creates a view of the Edge including all events after a specified start (exclusive).
+Creates a view of the Edge including all events after a specified start (exclusive).
|
@@ -1345,7 +1351,7 @@ Creates a view of the Edge including all events after a specified start (exclu
Edges! |
-Shrinks both the start and end of the window.
+Shrinks both the start and end of the window.
|
@@ -1364,7 +1370,7 @@ Shrinks both the start and end of the window.
Edges! |
-Set the start of the window.
+Set the start of the window.
|
@@ -1378,7 +1384,7 @@ Set the start of the window.
Edges! |
-Set the end of the window.
+Set the end of the window.
|
@@ -1426,7 +1432,7 @@ Each new edge object contains only updates from the respective layers.
Edges! |
-Specify a sort order.
+Specify a sort order from: source, destination, property, time. You can also reverse the ordering.
|
@@ -1470,7 +1476,7 @@ Returns the number of edges.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -1493,7 +1499,11 @@ will be returned.
| list |
[Edge!]! |
- |
+
+
+Returns a list of all objects in the current selection of the collection. You should filter filter the collection first then call list.
+
+ |
@@ -1523,7 +1533,7 @@ will be returned.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -1588,7 +1598,7 @@ Content of the document.
[Float!]! |
-Embedding vector.
+Similarity score with a specified query
|
@@ -1835,7 +1845,7 @@ Add the adjacent edges with higher score for query to the selection up to a spec
[String!]! |
-Returns the names of all layers in the graph.
+Returns the names of all layers in the graphview.
|
@@ -1844,7 +1854,7 @@ Returns the names of all layers in the graph.
Graph! |
-Returns a view containing only the default edge layer.
+Returns a view containing only the default layer.
|
@@ -1909,7 +1919,7 @@ Returns a view containing all layers except the specified excluded layer.
Graph! |
-Returns a subgraph of a specified set of nodes.
+Returns a subgraph of a specified set of nodes which contains only the edges that connect nodes of the subgraph to each other.
|
@@ -1960,7 +1970,7 @@ Returns a subgraph containing all nodes except the specified excluded nodes.
GraphWindowSet! |
-Creates a rolling window with the specified window size and an optional step..
+Creates a rolling window with the specified window size and an optional step.
|
@@ -1993,7 +2003,7 @@ Creates a expanding window with the specified step size.
Graph! |
-Return a graph containing only the activity between start and end measured as milliseconds from epoch
+Return a graph containing only the activity between start and end, by default raphtory stores times in milliseconds from the unix epoch.
|
@@ -2035,7 +2045,7 @@ Creates a view including all events at the latest time.
Graph! |
-Create a view including all events that have not been explicitly deleted at the specified time.
+Create a view including all events that are valid at the specified time.
|
@@ -2049,7 +2059,7 @@ Create a view including all events that have not been explicitly deleted at the
Graph! |
-Create a view including all events that have not been explicitly deleted at the latest time.
+Create a view including all events that are valid at the latest time.
|
@@ -2105,7 +2115,7 @@ Shrink both the start and end of the window.
Graph! |
-Set the start of the window to the larger of start and self.start().
+Set the start of the window to the larger of the specified value or current start.
|
@@ -2119,7 +2129,7 @@ Set the start of the window to the larger of start and self.start().
Graph! |
-Set the end of the window to the smaller of end and self.end()
+Set the end of the window to the smaller of the specified value or current end.
|
@@ -2142,7 +2152,7 @@ Returns the timestamp for the creation of the graph.
Int! |
-Returns the graph's last opened timestamp.
+Returns the graph's last opened timestamp according to system time.
|
@@ -2244,6 +2254,8 @@ Returns the number of temporal edges in the graph.
Returns the number of nodes in the graph.
+Optionally takes a list of node ids to return a subset.
+
@@ -2265,7 +2277,7 @@ Returns true if the graph contains the specified node.
| Boolean! |
-Returns true if the graph contains the specified edge. Edges are specified by providing a source and destination node id.
+Returns true if the graph contains the specified edge. Edges are specified by providing a source and destination node id. You can restrict the search to a specified layer.
|
@@ -2448,7 +2460,7 @@ Export all nodes and edges from this graph view to another existing graph
GqlIndexSpec! |
-Get index specification.
+(Experimental) Get index specification.
|
@@ -2457,7 +2469,7 @@ Get index specification.
[Node!]! |
-Searches for nodes which match the given filter expression.
+(Experimental) Searches for nodes which match the given filter expression.
Uses Tantivy's exact search.
@@ -2483,7 +2495,7 @@ Uses Tantivy's exact search.
| [Edge!]! |
-Searches for edges which match the given filter expression.
+(Experimental) Searches the index for edges which match the given filter expression.
Uses Tantivy's exact search.
@@ -2507,7 +2519,12 @@ Uses Tantivy's exact search.
|
| applyViews |
Graph! |
- |
+
+
+Returns the specified graph view or if none is specified returns the default view.
+This allows you to specify multiple operations together.
+
+ |
| views |
@@ -2530,43 +2547,43 @@ Uses Tantivy's exact search.
- |
-[PagerankOutput!]! |
+shortest_path |
+[ShortestPathOutput!]! |
|
-| iterCount |
-Int! |
+source |
+String! |
|
-| threads |
-Int |
+targets |
+[String!]! |
|
-| tol |
-Float |
+direction |
+String |
|
-| shortest_path |
-[ShortestPathOutput!]! |
+ |
+[PagerankOutput!]! |
|
-| source |
-String! |
+iterCount |
+Int! |
|
-| targets |
-[String!]! |
+threads |
+Int |
|
-| direction |
-String |
+tol |
+Float |
|
@@ -2626,7 +2643,7 @@ Returns the number of items.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -2704,7 +2721,7 @@ Returns the list of edge schemas for this edge layer
String |
-Returns the metagraph name.
+Returns the graph name.
|
@@ -2713,7 +2730,7 @@ Returns the metagraph name.
String! |
-Returns path of metagraph.
+Returns path of graph.
|
@@ -2722,7 +2739,7 @@ Returns path of metagraph.
Int! |
-Returns the timestamp for the creation of the metagraph.
+Returns the timestamp for the creation of the graph.
|
@@ -2731,7 +2748,7 @@ Returns the timestamp for the creation of the metagraph.
Int! |
-Returns the metagraph's last opened timestamp.
+Returns the graph's last opened timestamp according to system time.
|
@@ -2740,7 +2757,7 @@ Returns the metagraph's last opened timestamp.
Int! |
-Returns the metagraph's last updated timestamp.
+Returns the graph's last updated timestamp.
|
@@ -2749,7 +2766,7 @@ Returns the metagraph's last updated timestamp.
Int! |
-Returns the number of nodes in the metagraph.
+Returns the number of nodes in the graph.
|
@@ -2758,7 +2775,7 @@ Returns the number of nodes in the metagraph.
Int! |
-Returns the number of edges in the metagraph.
+Returns the number of edges in the graph.
|
@@ -2767,7 +2784,7 @@ Returns the number of edges in the metagraph.
[Property!]! |
-Returns the metadata of the metagraph.
+Returns the metadata of the graph.
|
@@ -2857,7 +2874,7 @@ Return all metadata keys.
Boolean! |
-Use to check if adding the edge was successful
+Use to check if adding the edge was successful.
|
@@ -2866,7 +2883,7 @@ Use to check if adding the edge was successful
Edge! |
-Get the non-mutable edge for querying
+Get the non-mutable edge for querying.
|
@@ -2875,7 +2892,7 @@ Get the non-mutable edge for querying
MutableNode! |
-Get the mutable source node of the edge
+Get the mutable source node of the edge.
|
@@ -2884,7 +2901,7 @@ Get the mutable source node of the edge
MutableNode! |
-Get the mutable destination node of the edge
+Get the mutable destination node of the edge.
|
@@ -2893,7 +2910,7 @@ Get the mutable destination node of the edge
Boolean! |
-Mark the edge as deleted at time time
+Mark the edge as deleted at time time.
|
@@ -2912,9 +2929,9 @@ Mark the edge as deleted at time time
Boolean! |
-Add metadata to the edge (errors if the value already exists)
+Add metadata to the edge (errors if the value already exists).
-If this is called after add_edge , the layer is inherited from the add_edge and does not
+If this is called after add_edge, the layer is inherited from the add_edge and does not
need to be specified again.
|
@@ -2934,9 +2951,9 @@ need to be specified again.
Boolean! |
-Update metadata of the edge (existing values are overwritten)
+Update metadata of the edge (existing values are overwritten).
-If this is called after add_edge , the layer is inherited from the add_edge and does not
+If this is called after add_edge, the layer is inherited from the add_edge and does not
need to be specified again.
|
@@ -2956,9 +2973,9 @@ need to be specified again.
Boolean! |
-Add temporal property updates to the edge
+Add temporal property updates to the edge.
-If this is called after add_edge , the layer is inherited from the add_edge and does not
+If this is called after add_edge, the layer is inherited from the add_edge and does not
need to be specified again.
|
@@ -2998,7 +3015,7 @@ need to be specified again.
Graph! |
-Get the non-mutable graph
+Get the non-mutable graph.
|
@@ -3007,7 +3024,7 @@ Get the non-mutable graph
MutableNode |
-Get mutable existing node
+Get mutable existing node.
|
@@ -3021,7 +3038,7 @@ Get mutable existing node
MutableNode! |
-Add a new node or add updates to an existing node
+Add a new node or add updates to an existing node.
|
@@ -3050,7 +3067,7 @@ Add a new node or add updates to an existing node
MutableNode! |
-Create a new node or fail if it already exists
+Create a new node or fail if it already exists.
|
@@ -3079,7 +3096,7 @@ Create a new node or fail if it already exists
Boolean! |
-Add a batch of nodes
+Add a batch of nodes.
|
@@ -3093,7 +3110,7 @@ Add a batch of nodes
MutableEdge |
-Get a mutable existing edge
+Get a mutable existing edge.
|
@@ -3112,7 +3129,7 @@ Get a mutable existing edge
MutableEdge! |
-Add a new edge or add updates to an existing edge
+Add a new edge or add updates to an existing edge.
|
@@ -3146,7 +3163,7 @@ Add a new edge or add updates to an existing edge
Boolean! |
-Add a batch of edges
+Add a batch of edges.
|
@@ -3160,7 +3177,7 @@ Add a batch of edges
MutableEdge! |
-Mark an edge as deleted (creates the edge if it did not exist)
+Mark an edge as deleted (creates the edge if it did not exist).
|
@@ -3189,7 +3206,7 @@ Mark an edge as deleted (creates the edge if it did not exist)
Boolean! |
-Add temporal properties to graph
+Add temporal properties to graph.
|
@@ -3208,7 +3225,7 @@ Add temporal properties to graph
Boolean! |
-Add metadata to graph (errors if the property already exists)
+Add metadata to graph (errors if the property already exists).
|
@@ -3222,7 +3239,7 @@ Add metadata to graph (errors if the property already exists)
Boolean! |
-Update metadata of the graph (overwrites existing values)
+Update metadata of the graph (overwrites existing values).
|
@@ -3251,7 +3268,7 @@ Update metadata of the graph (overwrites existing values)
Boolean! |
-Use to check if adding the node was successful
+Use to check if adding the node was successful.
|
@@ -3260,7 +3277,7 @@ Use to check if adding the node was successful
Node! |
-Get the non-mutable Node
+Get the non-mutable Node.
|
@@ -3269,7 +3286,7 @@ Get the non-mutable Node
Boolean! |
-Add metadata to the node (errors if the property already exists)
+Add metadata to the node (errors if the property already exists).
|
@@ -3283,7 +3300,7 @@ Add metadata to the node (errors if the property already exists)
Boolean! |
-Set the node type (errors if the node already has a non-default type)
+Set the node type (errors if the node already has a non-default type).
|
@@ -3297,7 +3314,7 @@ Set the node type (errors if the node already has a non-default type)
Boolean! |
-Update metadata of the node (overwrites existing property values)
+Update metadata of the node (overwrites existing property values).
|
@@ -3311,7 +3328,7 @@ Update metadata of the node (overwrites existing property values)
Boolean! |
-Add temporal property updates to the node
+Add temporal property updates to the node.
|
@@ -3425,7 +3442,7 @@ Returns the name of the node.
Node! |
-Return a view of the node containing only the default edge layer.
+Return a view of the node containing only the default layer.
|
@@ -3448,7 +3465,7 @@ Return a view of node containing all layers specified.
Node! |
-Return a view of node containing all layers except those specified.
+Returns a collection containing nodes belonging to all layers except the excluded list of layers.
|
@@ -3462,7 +3479,7 @@ Return a view of node containing all layers except those specified.
Node! |
-Return a view of node containing the specified layer.
+Returns a collection containing nodes belonging to the specified layer.
|
@@ -3476,7 +3493,7 @@ Return a view of node containing the specified layer.
Node! |
-Return a view of node containing all layers except those specified.
+Returns a collection containing nodes belonging to all layers except the excluded layer.
|
@@ -3492,6 +3509,8 @@ Return a view of node containing all layers except those specified.
Creates a WindowSet with the specified window size and optional step using a rolling window.
+Returns a collection of collections. This means that item in the window set is a collection of nodes.
+
@@ -3565,7 +3584,7 @@ Create a view of the node including all events at the latest time.
| Node! |
-Create a view of the node including all events that have not been explicitly deleted at the specified time.
+Create a view of the node including all events that are valid at the specified time.
|
@@ -3579,7 +3598,7 @@ Create a view of the node including all events that have not been explicitly del
Node! |
-Create a view of the node including all events that have not been explicitly deleted at the latest time.
+Create a view of the node including all events that are valid at the latest time.
|
@@ -3616,7 +3635,7 @@ Create a view of the node including all events after the specified start time (e
Node! |
-Shrink both the start and end of the window.
+Shrink a Window to a specified start and end time, if these are earlier and later than the current start and end respectively.
|
@@ -3635,7 +3654,7 @@ Shrink both the start and end of the window.
Node! |
-Set the start of the window to the larger of a specified start time and self.start().
+Set the start of the window to the larger of a specified start time and self.start().
|
@@ -3680,7 +3699,11 @@ Returns the earliest time that the node exists.
| firstUpdate |
Int |
- |
+
+
+Returns the time of the first update made to the node.
+
+ |
| latestTime |
@@ -3694,7 +3717,11 @@ Returns the latest time that the node exists.
| lastUpdate |
Int |
- |
+
+
+Returns the time of the last update made to the node.
+
+ |
| start |
@@ -3773,7 +3800,7 @@ Returns the metadata of the node.
Int! |
-Returns the number of edges connected to this node.
+Returns the number of unique counter parties for this node.
|
@@ -3844,12 +3871,20 @@ Returns neighbouring nodes.
| inNeighbours |
PathFromNode! |
- |
+
+
+Returns the number of neighbours that have at least one in-going edge to this node.
+
+ |
| outNeighbours |
PathFromNode! |
- |
+
+
+Returns the number of neighbours that have at least one out-going edge from this node.
+
+ |
| nodeFilter |
@@ -3923,7 +3958,7 @@ Returns the list of property schemas for this node
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -4108,7 +4143,7 @@ Create a view of the nodes including all events at the latest time.
Nodes! |
-Create a view of the nodes including all events that have not been explicitly deleted at the specified time.
+Create a view of the nodes including all events that are valid at the specified time.
|
@@ -4122,7 +4157,7 @@ Create a view of the nodes including all events that have not been explicitly de
Nodes! |
-Create a view of the nodes including all events that have not been explicitly deleted at the latest time.
+Create a view of the nodes including all events that are valid at the latest time.
|
@@ -4178,7 +4213,7 @@ Shrink both the start and end of the window.
Nodes! |
-Set the start of the window to the larger of a specified start time and self.start().
+Set the start of the window to the larger of a specified start time and self.start().
|
@@ -4280,7 +4315,7 @@ Returns the end time of the window. Errors if there is no window.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -4342,7 +4377,7 @@ Returns a view of the node ids.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -4536,7 +4571,7 @@ Create a view of the PathFromNode including all events at time.
PathFromNode! |
-Create a view of the PathFromNode including all events that have not been explicitly deleted at the latest time.
+Create a view of the PathFromNode including all events that are valid at the latest time.
|
@@ -4545,7 +4580,7 @@ Create a view of the PathFromNode including all events that have not been explic
PathFromNode! |
-Create a view of the PathFromNode including all events that have not been explicitly deleted at the specified time.
+Create a view of the PathFromNode including all events that are valid at the specified time.
|
@@ -4683,7 +4718,7 @@ Returns the latest time that this PathFromNode is valid or None if the PathFromN
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -4720,7 +4755,11 @@ Returns the node ids.
| applyViews |
PathFromNode! |
- |
+
+
+Takes a specified selection of views and applies them in given order.
+
+ |
| views |
@@ -4755,7 +4794,7 @@ Returns the node ids.
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
-For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
@@ -5237,7 +5276,7 @@ Search the top scoring edges according to a specified query returning no more th
String! |
-Source node
+Source node.
|
@@ -5246,7 +5285,7 @@ Source node
String! |
-Destination node
+Destination node.
|
@@ -5255,7 +5294,7 @@ Destination node
String |
-Layer
+Layer.
|
@@ -5264,7 +5303,7 @@ Layer
[PropertyInput!] |
-Metadata
+Metadata.
|
@@ -5518,7 +5557,7 @@ Window between a start and end time.
Int |
-Time.
+View at a specified time.
|
@@ -5527,7 +5566,7 @@ Time.
Int |
-Time.
+View before a specified time (end exclusive).
|
@@ -5536,7 +5575,7 @@ Time.
Int |
-Time.
+View after a specified time (start exclusive).
|
@@ -5545,7 +5584,7 @@ Time.
Window |
-Window between a start and end time.
+Shrink a Window to a specified start and end time.
|
@@ -5554,7 +5593,7 @@ Window between a start and end time.
Int |
-Time.
+Set the window start to a specified time.
|
@@ -5563,7 +5602,7 @@ Time.
Int |
-Time.
+Set the window end to a specified time.
|
@@ -5667,7 +5706,7 @@ Window between a start and end time.
Int |
-Time.
+View at a specified time.
|
@@ -5676,7 +5715,7 @@ Time.
Int |
-Time.
+View before a specified time (end exclusive).
|
@@ -5685,7 +5724,7 @@ Time.
Int |
-Time.
+View after a specified time (start exclusive).
|
@@ -5694,7 +5733,7 @@ Time.
Window |
-Window between a start and end time.
+Shrink a Window to a specified start and end time.
|
@@ -5703,7 +5742,7 @@ Window between a start and end time.
Int |
-Time.
+Set the window start to a specified time.
|
@@ -5712,7 +5751,7 @@ Time.
Int |
-Time.
+Set the window end to a specified time.
|
@@ -5825,7 +5864,7 @@ Window between a start and end time.
Int |
-Time.
+View at a specified time.
|
@@ -5834,7 +5873,7 @@ Time.
Boolean |
-Latest time.
+View at the latest time.
|
@@ -5861,7 +5900,7 @@ Snapshot at latest time.
Int |
-Time.
+View before a specified time (end exclusive).
|
@@ -5870,7 +5909,7 @@ Time.
Int |
-Time.
+View after a specified time (start exclusive).
|
@@ -5879,7 +5918,7 @@ Time.
Window |
-Window between a start and end time.
+Shrink a Window to a specified start and end time.
|
@@ -5888,7 +5927,7 @@ Window between a start and end time.
Int |
-Time.
+Set the window start to a specified time.
|
@@ -5897,7 +5936,7 @@ Time.
Int |
-Time.
+Set the window end to a specified time.
|
@@ -6002,7 +6041,7 @@ Destination node.
String! |
-Name.
+Node metadata to compare against.
|
@@ -6093,7 +6132,7 @@ Updates.
NodeField! |
-Node Field filter.
+Node component to compare against.
|
@@ -6270,7 +6309,7 @@ Contains only the default layer.
Boolean |
-Latest time.
+View at the latest time.
|
@@ -6342,7 +6381,7 @@ Window between a start and end time.
Int |
-Time.
+View at a specified time.
|
@@ -6351,7 +6390,7 @@ Time.
Int |
-Time.
+View before a specified time (end exclusive).
|
@@ -6360,7 +6399,7 @@ Time.
Int |
-Time.
+View after a specified time (start exclusive).
|
@@ -6369,7 +6408,7 @@ Time.
Window |
-Window between a start and end time.
+Shrink a Window to a specified start and end time.
|
@@ -6378,7 +6417,7 @@ Window between a start and end time.
Int |
-Time.
+Set the window start to a specified time.
|
@@ -6387,7 +6426,7 @@ Time.
Int |
-Time.
+Set the window end to a specified time.
|
@@ -6428,7 +6467,7 @@ Contains only the default layer.
Boolean |
-Latest time.
+View at the latest time.
|
@@ -6491,7 +6530,7 @@ Window between a start and end time.
Int |
-Time.
+View at a specified time.
|
@@ -6500,7 +6539,7 @@ Time.
Int |
-Time.
+Snapshot at specified time.
|
@@ -6509,7 +6548,7 @@ Time.
Int |
-Time.
+View before a specified time (end exclusive).
|
@@ -6518,7 +6557,7 @@ Time.
Int |
-Time.
+View after a specified time (start exclusive).
|
@@ -6527,7 +6566,7 @@ Time.
Window |
-Window between a start and end time.
+Shrink a Window to a specified start and end time.
|
@@ -6536,7 +6575,7 @@ Window between a start and end time.
Int |
-Time.
+Set the window start to a specified time.
|
@@ -6545,7 +6584,7 @@ Time.
Int |
-Time.
+Set the window end to a specified time.
|
@@ -6690,7 +6729,7 @@ Window between a start and end time.
Int |
-Time.
+View at a specified time.
|
@@ -6699,7 +6738,7 @@ Time.
Int |
-Time.
+View before a specified time (end exclusive).
|
@@ -6708,7 +6747,7 @@ Time.
Int |
-Time.
+View after a specified time (start exclusive).
|
@@ -6717,7 +6756,7 @@ Time.
Window |
-Window between a start and end time.
+Shrink a Window to a specified start and end time.
|
@@ -6726,7 +6765,7 @@ Window between a start and end time.
Int |
-Time.
+Set the window start to a specified time.
|
@@ -6735,7 +6774,7 @@ Time.
Int |
-Time.
+Set the window end to a specified time.
|
@@ -6758,7 +6797,7 @@ Time.
String! |
-Name.
+Node property to compare against.
|
@@ -6904,7 +6943,7 @@ Name.
TemporalType! |
-Temporal property type.
+Type of temporal property. Choose from: any, latest.
|
@@ -7088,6 +7127,8 @@ End time.
Duration of window period.
+Choose from:
+
diff --git a/raphtory-graphql/schema.graphql b/raphtory-graphql/schema.graphql
index d6c68095fc..97b7ccd9bf 100644
--- a/raphtory-graphql/schema.graphql
+++ b/raphtory-graphql/schema.graphql
@@ -25,7 +25,7 @@ type CollectionOfMetaGraph {
"""
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount. The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [MetaGraph!]!
@@ -46,7 +46,7 @@ type CollectionOfNamespace {
"""
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount. The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Namespace!]!
@@ -67,7 +67,7 @@ type CollectionOfNamespacedItem {
"""
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount. The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [NamespacedItem!]!
@@ -91,13 +91,13 @@ type Edge {
"""
defaultLayer: Edge!
"""
- Returns a view of Edge containing all layers in the list of names .
+ Returns a view of Edge containing all layers in the list of names.
Errors if any of the layers do not exist.
"""
layers(names: [String!]!): Edge!
"""
- Returns a view of Edge containing all layers except the excluded list of names .
+ Returns a view of Edge containing all layers except the excluded list of names.
Errors if any of the layers do not exist.
"""
@@ -127,11 +127,13 @@ type Edge {
"""
expanding(step: WindowDuration!): EdgeWindowSet!
"""
- Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+ Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+
+ For persistent graphs, any edge which exists at any point during the window will be included. You may want to restrict this to only edges that are present at the end of the window using the is_valid function.
"""
window(start: Int!, end: Int!): Edge!
"""
- Creates a view of the Edge including all events at a specified time .
+ Creates a view of the Edge including all events at a specified time.
"""
at(time: Int!): Edge!
"""
@@ -139,39 +141,39 @@ type Edge {
"""
latest: Edge!
"""
- Creates a view of the Edge including all events that have not been explicitly deleted at time.
+ Creates a view of the Edge including all events that are valid at time.
This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
"""
snapshotAt(time: Int!): Edge!
"""
- Creates a view of the Edge including all events that have not been explicitly deleted at the latest time.
+ Creates a view of the Edge including all events that are valid at the latest time.
This is equivalent to a no-op for Graph and latest() for PersistentGraph.
"""
snapshotLatest: Edge!
"""
- Creates a view of the Edge including all events before a specified end (exclusive).
+ Creates a view of the Edge including all events before a specified end (exclusive).
"""
before(time: Int!): Edge!
"""
- Creates a view of the Edge including all events after a specified start (exclusive).
+ Creates a view of the Edge including all events after a specified start (exclusive).
"""
after(time: Int!): Edge!
"""
- Shrinks both the start and end of the window.
+ Shrinks both the start and end of the window.
"""
shrinkWindow(start: Int!, end: Int!): Edge!
"""
- Set the start of the window.
+ Set the start of the window.
"""
shrinkStart(start: Int!): Edge!
"""
- Set the end of the window.
+ Set the end of the window.
"""
shrinkEnd(end: Int!): Edge!
"""
- Takes a specified selection of views and applies them in order given
+ Takes a specified selection of views and applies them in given order.
"""
applyViews(views: [EdgeViewCollection!]!): Edge!
"""
@@ -265,7 +267,7 @@ type Edge {
"""
isDeleted: Boolean!
"""
- Checks if the edge is on the same node.
+ Returns true if the edge source and destination nodes are the same.
Returns: boolean
"""
@@ -274,19 +276,19 @@ type Edge {
input EdgeAddition {
"""
- Source node
+ Source node.
"""
src: String!
"""
- Destination node
+ Destination node.
"""
dst: String!
"""
- Layer
+ Layer.
"""
layer: String
"""
- Metadata
+ Metadata.
"""
metadata: [PropertyInput!]
updates: [TemporalPropertyInput!]
@@ -407,27 +409,27 @@ input EdgeViewCollection @oneOf {
"""
window: Window
"""
- Time.
+ View at a specified time.
"""
at: Int
"""
- Time.
+ View before a specified time (end exclusive).
"""
before: Int
"""
- Time.
+ View after a specified time (start exclusive).
"""
after: Int
"""
- Window between a start and end time.
+ Shrink a Window to a specified start and end time.
"""
shrinkWindow: Window
"""
- Time.
+ Set the window start to a specified time.
"""
shrinkStart: Int
"""
- Time.
+ Set the window end to a specified time.
"""
shrinkEnd: Int
}
@@ -438,7 +440,7 @@ type EdgeWindowSet {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Edge!]!
@@ -447,68 +449,72 @@ type EdgeWindowSet {
type Edges {
"""
- Return a view of Edge containing only the default edge layer.
+ Returns a collection containing only edges in the default edge layer.
"""
defaultLayer: Edges!
"""
- Returns a view of Edge containing all layers in the list of names.
+ Returns a collection containing only edges belonging to the listed layers.
"""
layers(names: [String!]!): Edges!
"""
- Returns a view of Edge containing all layers except the excluded list of names.
+ Returns a collection containing edges belonging to all layers except the excluded list of layers.
"""
excludeLayers(names: [String!]!): Edges!
"""
- Returns a view of Edge containing the specified layer.
+ Returns a collection containing edges belonging to the specified layer.
"""
layer(name: String!): Edges!
"""
- Returns a view of Edge containing all layers except the excluded layer specified.
+ Returns a collection containing edges belonging to all layers except the excluded layer specified.
"""
excludeLayer(name: String!): Edges!
"""
Creates a WindowSet with the given window duration and optional step using a rolling window. A rolling window is a window that moves forward by step size at each iteration.
+
+ Returns a collection of collections. This means that item in the window set is a collection of edges.
"""
rolling(window: WindowDuration!, step: WindowDuration): EdgesWindowSet!
"""
Creates a WindowSet with the given step size using an expanding window. An expanding window is a window that grows by step size at each iteration.
+
+ Returns a collection of collections. This means that item in the window set is a collection of edges.
"""
expanding(step: WindowDuration!): EdgesWindowSet!
"""
- Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+ Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
"""
window(start: Int!, end: Int!): Edges!
"""
- Creates a view of the Edge including all events at a specified time .
+ Creates a view of the Edge including all events at a specified time.
"""
at(time: Int!): Edges!
latest: Edges!
"""
- Creates a view of the Edge including all events that have not been explicitly deleted at time. This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
+ Creates a view of the Edge including all events that are valid at time. This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
"""
snapshotAt(time: Int!): Edges!
"""
- Creates a view of the Edge including all events that have not been explicitly deleted at the latest time. This is equivalent to a no-op for Graph and latest() for PersistentGraph.
+ Creates a view of the Edge including all events that are valid at the latest time. This is equivalent to a no-op for Graph and latest() for PersistentGraph.
"""
snapshotLatest: Edges!
"""
- Creates a view of the Edge including all events before a specified end (exclusive).
+ Creates a view of the Edge including all events before a specified end (exclusive).
"""
before(time: Int!): Edges!
"""
- Creates a view of the Edge including all events after a specified start (exclusive).
+ Creates a view of the Edge including all events after a specified start (exclusive).
"""
after(time: Int!): Edges!
"""
- Shrinks both the start and end of the window.
+ Shrinks both the start and end of the window.
"""
shrinkWindow(start: Int!, end: Int!): Edges!
"""
- Set the start of the window.
+ Set the start of the window.
"""
shrinkStart(start: Int!): Edges!
"""
- Set the end of the window.
+ Set the end of the window.
"""
shrinkEnd(end: Int!): Edges!
"""
@@ -526,7 +532,7 @@ type Edges {
"""
explodeLayers: Edges!
"""
- Specify a sort order.
+ Specify a sort order from: source, destination, property, time. You can also reverse the ordering.
"""
sorted(sortBys: [EdgeSortBy!]!): Edges!
"""
@@ -545,10 +551,13 @@ type Edges {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Edge!]!
+ """
+ Returns a list of all objects in the current selection of the collection. You should filter filter the collection first then call list.
+ """
list: [Edge!]!
}
@@ -590,27 +599,27 @@ input EdgesViewCollection @oneOf {
"""
window: Window
"""
- Time.
+ View at a specified time.
"""
at: Int
"""
- Time.
+ View before a specified time (end exclusive).
"""
before: Int
"""
- Time.
+ View after a specified time (start exclusive).
"""
after: Int
"""
- Window between a start and end time.
+ Shrink a Window to a specified start and end time.
"""
shrinkWindow: Window
"""
- Time.
+ Set the window start to a specified time.
"""
shrinkStart: Int
"""
- Time.
+ Set the window end to a specified time.
"""
shrinkEnd: Int
}
@@ -621,7 +630,7 @@ type EdgesWindowSet {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Edges!]!
@@ -642,7 +651,7 @@ type GqlDocument {
"""
content: String!
"""
- Embedding vector.
+ Similarity score with a specified query
"""
embedding: [Float!]!
score: Float!
@@ -714,11 +723,11 @@ type GqlVectorSelection {
type Graph {
"""
- Returns the names of all layers in the graph.
+ Returns the names of all layers in the graphview.
"""
uniqueLayers: [String!]!
"""
- Returns a view containing only the default edge layer.
+ Returns a view containing only the default layer.
"""
defaultLayer: Graph!
"""
@@ -738,7 +747,7 @@ type Graph {
"""
excludeLayer(name: String!): Graph!
"""
- Returns a subgraph of a specified set of nodes.
+ Returns a subgraph of a specified set of nodes which contains only the edges that connect nodes of the subgraph to each other.
"""
subgraph(nodes: [String!]!): Graph!
"""
@@ -754,7 +763,7 @@ type Graph {
"""
excludeNodes(nodes: [String!]!): Graph!
"""
- Creates a rolling window with the specified window size and an optional step..
+ Creates a rolling window with the specified window size and an optional step.
"""
rolling(window: WindowDuration!, step: WindowDuration): GraphWindowSet!
"""
@@ -762,7 +771,7 @@ type Graph {
"""
expanding(step: WindowDuration!): GraphWindowSet!
"""
- Return a graph containing only the activity between start and end measured as milliseconds from epoch
+ Return a graph containing only the activity between start and end, by default raphtory stores times in milliseconds from the unix epoch.
"""
window(start: Int!, end: Int!): Graph!
"""
@@ -774,11 +783,11 @@ type Graph {
"""
latest: Graph!
"""
- Create a view including all events that have not been explicitly deleted at the specified time.
+ Create a view including all events that are valid at the specified time.
"""
snapshotAt(time: Int!): Graph!
"""
- Create a view including all events that have not been explicitly deleted at the latest time.
+ Create a view including all events that are valid at the latest time.
"""
snapshotLatest: Graph!
"""
@@ -794,11 +803,11 @@ type Graph {
"""
shrinkWindow(start: Int!, end: Int!): Graph!
"""
- Set the start of the window to the larger of start and self.start().
+ Set the start of the window to the larger of the specified value or current start.
"""
shrinkStart(start: Int!): Graph!
"""
- Set the end of the window to the smaller of end and self.end()
+ Set the end of the window to the smaller of the specified value or current end.
"""
shrinkEnd(end: Int!): Graph!
"""
@@ -806,7 +815,7 @@ type Graph {
"""
created: Int!
"""
- Returns the graph's last opened timestamp.
+ Returns the graph's last opened timestamp according to system time.
"""
lastOpened: Int!
"""
@@ -847,6 +856,8 @@ type Graph {
countTemporalEdges: Int!
"""
Returns the number of nodes in the graph.
+
+ Optionally takes a list of node ids to return a subset.
"""
countNodes: Int!
"""
@@ -854,7 +865,7 @@ type Graph {
"""
hasNode(name: String!): Boolean!
"""
- Returns true if the graph contains the specified edge. Edges are specified by providing a source and destination node id.
+ Returns true if the graph contains the specified edge. Edges are specified by providing a source and destination node id. You can restrict the search to a specified layer.
"""
hasEdge(src: String!, dst: String!, layer: String): Boolean!
"""
@@ -906,27 +917,31 @@ type Graph {
nodeFilter(filter: NodeFilter!): Graph!
edgeFilter(filter: EdgeFilter!): Graph!
"""
- Get index specification.
+ (Experimental) Get index specification.
"""
getIndexSpec: GqlIndexSpec!
"""
- Searches for nodes which match the given filter expression.
+ (Experimental) Searches for nodes which match the given filter expression.
Uses Tantivy's exact search.
"""
searchNodes(filter: NodeFilter!, limit: Int!, offset: Int!): [Node!]!
"""
- Searches for edges which match the given filter expression.
+ (Experimental) Searches the index for edges which match the given filter expression.
Uses Tantivy's exact search.
"""
searchEdges(filter: EdgeFilter!, limit: Int!, offset: Int!): [Edge!]!
+ """
+ Returns the specified graph view or if none is specified returns the default view.
+ This allows you to specify multiple operations together.
+ """
applyViews(views: [GraphViewCollection!]!): Graph!
}
type GraphAlgorithmPlugin {
- pagerank(iterCount: Int!, threads: Int, tol: Float): [PagerankOutput!]!
shortest_path(source: String!, targets: [String!]!, direction: String): [ShortestPathOutput!]!
+ pagerank(iterCount: Int!, threads: Int, tol: Float): [PagerankOutput!]!
}
type GraphSchema {
@@ -987,11 +1002,11 @@ input GraphViewCollection @oneOf {
"""
window: Window
"""
- Time.
+ View at a specified time.
"""
at: Int
"""
- Latest time.
+ View at the latest time.
"""
latest: Boolean
"""
@@ -1003,23 +1018,23 @@ input GraphViewCollection @oneOf {
"""
snapshotLatest: Boolean
"""
- Time.
+ View before a specified time (end exclusive).
"""
before: Int
"""
- Time.
+ View after a specified time (start exclusive).
"""
after: Int
"""
- Window between a start and end time.
+ Shrink a Window to a specified start and end time.
"""
shrinkWindow: Window
"""
- Time.
+ Set the window start to a specified time.
"""
shrinkStart: Int
"""
- Time.
+ Set the window end to a specified time.
"""
shrinkEnd: Int
"""
@@ -1041,7 +1056,7 @@ type GraphWindowSet {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Graph!]!
@@ -1085,35 +1100,35 @@ type LayerSchema {
type MetaGraph {
"""
- Returns the metagraph name.
+ Returns the graph name.
"""
name: String
"""
- Returns path of metagraph.
+ Returns path of graph.
"""
path: String!
"""
- Returns the timestamp for the creation of the metagraph.
+ Returns the timestamp for the creation of the graph.
"""
created: Int!
"""
- Returns the metagraph's last opened timestamp.
+ Returns the graph's last opened timestamp according to system time.
"""
lastOpened: Int!
"""
- Returns the metagraph's last updated timestamp.
+ Returns the graph's last updated timestamp.
"""
lastUpdated: Int!
"""
- Returns the number of nodes in the metagraph.
+ Returns the number of nodes in the graph.
"""
nodeCount: Int!
"""
- Returns the number of edges in the metagraph.
+ Returns the number of edges in the graph.
"""
edgeCount: Int!
"""
- Returns the metadata of the metagraph.
+ Returns the metadata of the graph.
"""
metadata: [Property!]!
}
@@ -1139,7 +1154,7 @@ type Metadata {
input MetadataFilterExpr {
"""
- Name.
+ Node metadata to compare against.
"""
name: String!
"""
@@ -1154,7 +1169,7 @@ input MetadataFilterExpr {
type MutRoot {
"""
- Returns a plugin.
+ Returns a collection of mutation plugins.
"""
plugins: MutationPlugin!
"""
@@ -1180,7 +1195,7 @@ type MutRoot {
"""
copyGraph(path: String!, newPath: String!): Boolean!
"""
- Upload graph file from a path on the client.
+ Upload a graph file from a path on the client using GQL multipart uploading.
Returns::
name of the new graph
@@ -1201,50 +1216,50 @@ type MutRoot {
"""
createSubgraph(parentPath: String!, nodes: [String!]!, newPath: String!, overwrite: Boolean!): String!
"""
- Creates search index.
+ (Experimental) Creates search index.
"""
createIndex(path: String!, indexSpec: IndexSpecInput, inRam: Boolean!): Boolean!
}
type MutableEdge {
"""
- Use to check if adding the edge was successful
+ Use to check if adding the edge was successful.
"""
success: Boolean!
"""
- Get the non-mutable edge for querying
+ Get the non-mutable edge for querying.
"""
edge: Edge!
"""
- Get the mutable source node of the edge
+ Get the mutable source node of the edge.
"""
src: MutableNode!
"""
- Get the mutable destination node of the edge
+ Get the mutable destination node of the edge.
"""
dst: MutableNode!
"""
- Mark the edge as deleted at time time
+ Mark the edge as deleted at time time.
"""
delete(time: Int!, layer: String): Boolean!
"""
- Add metadata to the edge (errors if the value already exists)
+ Add metadata to the edge (errors if the value already exists).
- If this is called after add_edge , the layer is inherited from the add_edge and does not
+ If this is called after add_edge, the layer is inherited from the add_edge and does not
need to be specified again.
"""
addMetadata(properties: [PropertyInput!]!, layer: String): Boolean!
"""
- Update metadata of the edge (existing values are overwritten)
+ Update metadata of the edge (existing values are overwritten).
- If this is called after add_edge , the layer is inherited from the add_edge and does not
+ If this is called after add_edge, the layer is inherited from the add_edge and does not
need to be specified again.
"""
updateMetadata(properties: [PropertyInput!]!, layer: String): Boolean!
"""
- Add temporal property updates to the edge
+ Add temporal property updates to the edge.
- If this is called after add_edge , the layer is inherited from the add_edge and does not
+ If this is called after add_edge, the layer is inherited from the add_edge and does not
need to be specified again.
"""
addUpdates(time: Int!, properties: [PropertyInput!], layer: String): Boolean!
@@ -1252,78 +1267,78 @@ type MutableEdge {
type MutableGraph {
"""
- Get the non-mutable graph
+ Get the non-mutable graph.
"""
graph: Graph!
"""
- Get mutable existing node
+ Get mutable existing node.
"""
node(name: String!): MutableNode
"""
- Add a new node or add updates to an existing node
+ Add a new node or add updates to an existing node.
"""
addNode(time: Int!, name: String!, properties: [PropertyInput!], nodeType: String): MutableNode!
"""
- Create a new node or fail if it already exists
+ Create a new node or fail if it already exists.
"""
createNode(time: Int!, name: String!, properties: [PropertyInput!], nodeType: String): MutableNode!
"""
- Add a batch of nodes
+ Add a batch of nodes.
"""
addNodes(nodes: [NodeAddition!]!): Boolean!
"""
- Get a mutable existing edge
+ Get a mutable existing edge.
"""
edge(src: String!, dst: String!): MutableEdge
"""
- Add a new edge or add updates to an existing edge
+ Add a new edge or add updates to an existing edge.
"""
addEdge(time: Int!, src: String!, dst: String!, properties: [PropertyInput!], layer: String): MutableEdge!
"""
- Add a batch of edges
+ Add a batch of edges.
"""
addEdges(edges: [EdgeAddition!]!): Boolean!
"""
- Mark an edge as deleted (creates the edge if it did not exist)
+ Mark an edge as deleted (creates the edge if it did not exist).
"""
deleteEdge(time: Int!, src: String!, dst: String!, layer: String): MutableEdge!
"""
- Add temporal properties to graph
+ Add temporal properties to graph.
"""
addProperties(t: Int!, properties: [PropertyInput!]!): Boolean!
"""
- Add metadata to graph (errors if the property already exists)
+ Add metadata to graph (errors if the property already exists).
"""
addMetadata(properties: [PropertyInput!]!): Boolean!
"""
- Update metadata of the graph (overwrites existing values)
+ Update metadata of the graph (overwrites existing values).
"""
updateMetadata(properties: [PropertyInput!]!): Boolean!
}
type MutableNode {
"""
- Use to check if adding the node was successful
+ Use to check if adding the node was successful.
"""
success: Boolean!
"""
- Get the non-mutable Node
+ Get the non-mutable Node.
"""
node: Node!
"""
- Add metadata to the node (errors if the property already exists)
+ Add metadata to the node (errors if the property already exists).
"""
addMetadata(properties: [PropertyInput!]!): Boolean!
"""
- Set the node type (errors if the node already has a non-default type)
+ Set the node type (errors if the node already has a non-default type).
"""
setNodeType(newType: String!): Boolean!
"""
- Update metadata of the node (overwrites existing property values)
+ Update metadata of the node (overwrites existing property values).
"""
updateMetadata(properties: [PropertyInput!]!): Boolean!
"""
- Add temporal property updates to the node
+ Add temporal property updates to the node.
"""
addUpdates(time: Int!, properties: [PropertyInput!]): Boolean!
}
@@ -1355,7 +1370,7 @@ type Node {
"""
name: String!
"""
- Return a view of the node containing only the default edge layer.
+ Return a view of the node containing only the default layer.
"""
defaultLayer: Node!
"""
@@ -1363,19 +1378,21 @@ type Node {
"""
layers(names: [String!]!): Node!
"""
- Return a view of node containing all layers except those specified.
+ Returns a collection containing nodes belonging to all layers except the excluded list of layers.
"""
excludeLayers(names: [String!]!): Node!
"""
- Return a view of node containing the specified layer.
+ Returns a collection containing nodes belonging to the specified layer.
"""
layer(name: String!): Node!
"""
- Return a view of node containing all layers except those specified.
+ Returns a collection containing nodes belonging to all layers except the excluded layer.
"""
excludeLayer(name: String!): Node!
"""
Creates a WindowSet with the specified window size and optional step using a rolling window.
+
+ Returns a collection of collections. This means that item in the window set is a collection of nodes.
"""
rolling(window: WindowDuration!, step: WindowDuration): NodeWindowSet!
"""
@@ -1395,11 +1412,11 @@ type Node {
"""
latest: Node!
"""
- Create a view of the node including all events that have not been explicitly deleted at the specified time.
+ Create a view of the node including all events that are valid at the specified time.
"""
snapshotAt(time: Int!): Node!
"""
- Create a view of the node including all events that have not been explicitly deleted at the latest time.
+ Create a view of the node including all events that are valid at the latest time.
"""
snapshotLatest: Node!
"""
@@ -1411,11 +1428,11 @@ type Node {
"""
after(time: Int!): Node!
"""
- Shrink both the start and end of the window.
+ Shrink a Window to a specified start and end time, if these are earlier and later than the current start and end respectively.
"""
shrinkWindow(start: Int!, end: Int!): Node!
"""
- Set the start of the window to the larger of a specified start time and self.start().
+ Set the start of the window to the larger of a specified start time and self.start().
"""
shrinkStart(start: Int!): Node!
"""
@@ -1427,11 +1444,17 @@ type Node {
Returns the earliest time that the node exists.
"""
earliestTime: Int
+ """
+ Returns the time of the first update made to the node.
+ """
firstUpdate: Int
"""
Returns the latest time that the node exists.
"""
latestTime: Int
+ """
+ Returns the time of the last update made to the node.
+ """
lastUpdate: Int
"""
Gets the start time for the window. Errors if there is no window.
@@ -1466,7 +1489,7 @@ type Node {
"""
metadata: Metadata!
"""
- Returns the number of edges connected to this node.
+ Returns the number of unique counter parties for this node.
"""
degree: Int!
"""
@@ -1495,7 +1518,13 @@ type Node {
Returns neighbouring nodes.
"""
neighbours: PathFromNode!
+ """
+ Returns the number of neighbours that have at least one in-going edge to this node.
+ """
inNeighbours: PathFromNode!
+ """
+ Returns the number of neighbours that have at least one out-going edge from this node.
+ """
outNeighbours: PathFromNode!
nodeFilter(filter: NodeFilter!): Node!
}
@@ -1532,7 +1561,7 @@ enum NodeField {
input NodeFieldFilter {
"""
- Node Field filter.
+ Node component to compare against.
"""
field: NodeField!
"""
@@ -1610,7 +1639,7 @@ input NodeViewCollection @oneOf {
"""
defaultLayer: Boolean
"""
- Latest time.
+ View at the latest time.
"""
latest: Boolean
"""
@@ -1642,27 +1671,27 @@ input NodeViewCollection @oneOf {
"""
window: Window
"""
- Time.
+ View at a specified time.
"""
at: Int
"""
- Time.
+ View before a specified time (end exclusive).
"""
before: Int
"""
- Time.
+ View after a specified time (start exclusive).
"""
after: Int
"""
- Window between a start and end time.
+ Shrink a Window to a specified start and end time.
"""
shrinkWindow: Window
"""
- Time.
+ Set the window start to a specified time.
"""
shrinkStart: Int
"""
- Time.
+ Set the window end to a specified time.
"""
shrinkEnd: Int
"""
@@ -1677,7 +1706,7 @@ type NodeWindowSet {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Node!]!
@@ -1726,11 +1755,11 @@ type Nodes {
"""
latest: Nodes!
"""
- Create a view of the nodes including all events that have not been explicitly deleted at the specified time.
+ Create a view of the nodes including all events that are valid at the specified time.
"""
snapshotAt(time: Int!): Nodes!
"""
- Create a view of the nodes including all events that have not been explicitly deleted at the latest time.
+ Create a view of the nodes including all events that are valid at the latest time.
"""
snapshotLatest: Nodes!
"""
@@ -1746,7 +1775,7 @@ type Nodes {
"""
shrinkWindow(start: Int!, end: Int!): Nodes!
"""
- Set the start of the window to the larger of a specified start time and self.start().
+ Set the start of the window to the larger of a specified start time and self.start().
"""
shrinkStart(start: Int!): Nodes!
"""
@@ -1776,7 +1805,7 @@ type Nodes {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Node!]!
@@ -1793,7 +1822,7 @@ input NodesViewCollection @oneOf {
"""
defaultLayer: Boolean
"""
- Latest time.
+ View at the latest time.
"""
latest: Boolean
"""
@@ -1821,31 +1850,31 @@ input NodesViewCollection @oneOf {
"""
window: Window
"""
- Time.
+ View at a specified time.
"""
at: Int
"""
- Time.
+ Snapshot at specified time.
"""
snapshotAt: Int
"""
- Time.
+ View before a specified time (end exclusive).
"""
before: Int
"""
- Time.
+ View after a specified time (start exclusive).
"""
after: Int
"""
- Window between a start and end time.
+ Shrink a Window to a specified start and end time.
"""
shrinkWindow: Window
"""
- Time.
+ Set the window start to a specified time.
"""
shrinkStart: Int
"""
- Time.
+ Set the window end to a specified time.
"""
shrinkEnd: Int
"""
@@ -1864,7 +1893,7 @@ type NodesWindowSet {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Nodes!]!
@@ -1975,11 +2004,11 @@ type PathFromNode {
"""
at(time: Int!): PathFromNode!
"""
- Create a view of the PathFromNode including all events that have not been explicitly deleted at the latest time.
+ Create a view of the PathFromNode including all events that are valid at the latest time.
"""
snapshotLatest: PathFromNode!
"""
- Create a view of the PathFromNode including all events that have not been explicitly deleted at the specified time.
+ Create a view of the PathFromNode including all events that are valid at the specified time.
"""
snapshotAt(time: Int!): PathFromNode!
"""
@@ -2023,7 +2052,7 @@ type PathFromNode {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [Node!]!
@@ -2032,6 +2061,9 @@ type PathFromNode {
Returns the node ids.
"""
ids: [String!]!
+ """
+ Takes a specified selection of views and applies them in given order.
+ """
applyViews(views: [PathFromNodeViewCollection!]!): PathFromNode!
}
@@ -2069,27 +2101,27 @@ input PathFromNodeViewCollection @oneOf {
"""
window: Window
"""
- Time.
+ View at a specified time.
"""
at: Int
"""
- Time.
+ View before a specified time (end exclusive).
"""
before: Int
"""
- Time.
+ View after a specified time (start exclusive).
"""
after: Int
"""
- Window between a start and end time.
+ Shrink a Window to a specified start and end time.
"""
shrinkWindow: Window
"""
- Time.
+ Set the window start to a specified time.
"""
shrinkStart: Int
"""
- Time.
+ Set the window end to a specified time.
"""
shrinkEnd: Int
}
@@ -2100,7 +2132,7 @@ type PathFromNodeWindowSet {
Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
The page_index sets the number of pages to skip (defaults to 0).
- For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
will be returned.
"""
page(limit: Int!, offset: Int, pageIndex: Int): [PathFromNode!]!
@@ -2135,7 +2167,7 @@ type Property {
input PropertyFilterExpr {
"""
- Name.
+ Node property to compare against.
"""
name: String!
"""
@@ -2309,7 +2341,7 @@ input TemporalPropertyFilterExpr {
"""
name: String!
"""
- Temporal property type.
+ Type of temporal property. Choose from: any, latest.
"""
temporal: TemporalType!
"""
@@ -2410,6 +2442,8 @@ input Window {
input WindowDuration @oneOf {
"""
Duration of window period.
+
+ Choose from:
"""
duration: String
"""
diff --git a/raphtory-graphql/src/model/graph/collection.rs b/raphtory-graphql/src/model/graph/collection.rs
index 5abb4c05b9..aa345e984a 100644
--- a/raphtory-graphql/src/model/graph/collection.rs
+++ b/raphtory-graphql/src/model/graph/collection.rs
@@ -54,7 +54,7 @@ where
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount. The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(&self, limit: usize, offset: Option, page_index: Option) -> Vec {
let self_clone = self.clone();
diff --git a/raphtory-graphql/src/model/graph/document.rs b/raphtory-graphql/src/model/graph/document.rs
index 2f64c4958d..0ab622dbcf 100644
--- a/raphtory-graphql/src/model/graph/document.rs
+++ b/raphtory-graphql/src/model/graph/document.rs
@@ -32,7 +32,7 @@ pub struct GqlDocument {
pub(crate) entity: GqlDocumentEntity,
/// Content of the document.
pub(crate) content: String,
- /// Embedding vector.
+ /// Similarity score with a specified query
pub(crate) embedding: Vec,
pub(crate) score: f32,
}
diff --git a/raphtory-graphql/src/model/graph/edge.rs b/raphtory-graphql/src/model/graph/edge.rs
index 99790e962f..fcf6134e6e 100644
--- a/raphtory-graphql/src/model/graph/edge.rs
+++ b/raphtory-graphql/src/model/graph/edge.rs
@@ -63,7 +63,7 @@ impl GqlEdge {
self.ee.default_layer().into()
}
- /// Returns a view of Edge containing all layers in the list of names .
+ /// Returns a view of Edge containing all layers in the list of names.
///
/// Errors if any of the layers do not exist.
async fn layers(&self, names: Vec) -> GqlEdge {
@@ -71,7 +71,7 @@ impl GqlEdge {
blocking_compute(move || self_clone.ee.valid_layers(names).into()).await
}
- /// Returns a view of Edge containing all layers except the excluded list of names .
+ /// Returns a view of Edge containing all layers except the excluded list of names.
///
/// Errors if any of the layers do not exist.
async fn exclude_layers(&self, names: Vec) -> GqlEdge {
@@ -137,12 +137,14 @@ impl GqlEdge {
}
}
- /// Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+ /// Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+ ///
+ /// For persistent graphs, any edge which exists at any point during the window will be included. You may want to restrict this to only edges that are present at the end of the window using the is_valid function.
async fn window(&self, start: i64, end: i64) -> GqlEdge {
self.ee.window(start, end).into()
}
- /// Creates a view of the Edge including all events at a specified time .
+ /// Creates a view of the Edge including all events at a specified time.
async fn at(&self, time: i64) -> GqlEdge {
self.ee.at(time).into()
}
@@ -152,46 +154,46 @@ impl GqlEdge {
self.ee.latest().into()
}
- /// Creates a view of the Edge including all events that have not been explicitly deleted at time.
+ /// Creates a view of the Edge including all events that are valid at time.
///
/// This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
async fn snapshot_at(&self, time: i64) -> GqlEdge {
self.ee.snapshot_at(time).into()
}
- /// Creates a view of the Edge including all events that have not been explicitly deleted at the latest time.
+ /// Creates a view of the Edge including all events that are valid at the latest time.
///
/// This is equivalent to a no-op for Graph and latest() for PersistentGraph.
async fn snapshot_latest(&self) -> GqlEdge {
self.ee.snapshot_latest().into()
}
- /// Creates a view of the Edge including all events before a specified end (exclusive).
+ /// Creates a view of the Edge including all events before a specified end (exclusive).
async fn before(&self, time: i64) -> GqlEdge {
self.ee.before(time).into()
}
- /// Creates a view of the Edge including all events after a specified start (exclusive).
+ /// Creates a view of the Edge including all events after a specified start (exclusive).
async fn after(&self, time: i64) -> GqlEdge {
self.ee.after(time).into()
}
- /// Shrinks both the start and end of the window.
+ /// Shrinks both the start and end of the window.
async fn shrink_window(&self, start: i64, end: i64) -> Self {
self.ee.shrink_window(start, end).into()
}
- /// Set the start of the window.
+ /// Set the start of the window.
async fn shrink_start(&self, start: i64) -> Self {
self.ee.shrink_start(start).into()
}
- /// Set the end of the window.
+ /// Set the end of the window.
async fn shrink_end(&self, end: i64) -> Self {
self.ee.shrink_end(end).into()
}
- /// Takes a specified selection of views and applies them in order given
+ /// Takes a specified selection of views and applies them in given order.
async fn apply_views(&self, views: Vec) -> Result {
let mut return_view: GqlEdge = self.ee.clone().into();
for view in views {
@@ -368,7 +370,7 @@ impl GqlEdge {
self.ee.is_deleted()
}
- /// Checks if the edge is on the same node.
+ /// Returns true if the edge source and destination nodes are the same.
///
/// Returns: boolean
async fn is_self_loop(&self) -> bool {
diff --git a/raphtory-graphql/src/model/graph/edges.rs b/raphtory-graphql/src/model/graph/edges.rs
index 685ae927a5..ae043e2bcf 100644
--- a/raphtory-graphql/src/model/graph/edges.rs
+++ b/raphtory-graphql/src/model/graph/edges.rs
@@ -47,41 +47,45 @@ impl GqlEdges {
}
}
-/// A collection of edges that can be iterated over.
+/// A collection of edges.
+///
+/// Collections can be filtered and used to create lists.
#[ResolvedObjectFields]
impl GqlEdges {
////////////////////////
// LAYERS AND WINDOWS //
////////////////////////
- /// Return a view of Edge containing only the default edge layer.
+ /// Returns a collection containing only edges in the default edge layer.
async fn default_layer(&self) -> Self {
self.update(self.ee.default_layer())
}
- /// Returns a view of Edge containing all layers in the list of names.
+ /// Returns a collection containing only edges belonging to the listed layers.
async fn layers(&self, names: Vec) -> Self {
let self_clone = self.clone();
blocking_compute(move || self_clone.update(self_clone.ee.valid_layers(names))).await
}
- /// Returns a view of Edge containing all layers except the excluded list of names.
+ /// Returns a collection containing edges belonging to all layers except the excluded list of layers.
async fn exclude_layers(&self, names: Vec) -> Self {
let self_clone = self.clone();
blocking_compute(move || self_clone.update(self_clone.ee.exclude_valid_layers(names))).await
}
- /// Returns a view of Edge containing the specified layer.
+ /// Returns a collection containing edges belonging to the specified layer.
async fn layer(&self, name: String) -> Self {
self.update(self.ee.valid_layers(name))
}
- /// Returns a view of Edge containing all layers except the excluded layer specified.
+ /// Returns a collection containing edges belonging to all layers except the excluded layer specified.
async fn exclude_layer(&self, name: String) -> Self {
self.update(self.ee.exclude_valid_layers(name))
}
/// Creates a WindowSet with the given window duration and optional step using a rolling window. A rolling window is a window that moves forward by step size at each iteration.
+ ///
+ /// Returns a collection of collections. This means that item in the window set is a collection of edges.
async fn rolling(
&self,
window: WindowDuration,
@@ -114,6 +118,8 @@ impl GqlEdges {
}
/// Creates a WindowSet with the given step size using an expanding window. An expanding window is a window that grows by step size at each iteration.
+ ///
+ /// Returns a collection of collections. This means that item in the window set is a collection of edges.
async fn expanding(&self, step: WindowDuration) -> Result {
match step {
Duration(step) => Ok(GqlEdgesWindowSet::new(self.ee.expanding(step)?)),
@@ -121,12 +127,12 @@ impl GqlEdges {
}
}
- /// Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
+ /// Creates a view of the Edge including all events between the specified start (inclusive) and end (exclusive).
async fn window(&self, start: i64, end: i64) -> Self {
self.update(self.ee.window(start, end))
}
- /// Creates a view of the Edge including all events at a specified time .
+ /// Creates a view of the Edge including all events at a specified time.
async fn at(&self, time: i64) -> Self {
self.update(self.ee.at(time))
}
@@ -135,37 +141,37 @@ impl GqlEdges {
self.update(self.ee.latest())
}
- /// Creates a view of the Edge including all events that have not been explicitly deleted at time. This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
+ /// Creates a view of the Edge including all events that are valid at time. This is equivalent to before(time + 1) for Graph and at(time) for PersistentGraph.
async fn snapshot_at(&self, time: i64) -> Self {
self.update(self.ee.snapshot_at(time))
}
- /// Creates a view of the Edge including all events that have not been explicitly deleted at the latest time. This is equivalent to a no-op for Graph and latest() for PersistentGraph.
+ /// Creates a view of the Edge including all events that are valid at the latest time. This is equivalent to a no-op for Graph and latest() for PersistentGraph.
async fn snapshot_latest(&self) -> Self {
self.update(self.ee.snapshot_latest())
}
- /// Creates a view of the Edge including all events before a specified end (exclusive).
+ /// Creates a view of the Edge including all events before a specified end (exclusive).
async fn before(&self, time: i64) -> Self {
self.update(self.ee.before(time))
}
- /// Creates a view of the Edge including all events after a specified start (exclusive).
+ /// Creates a view of the Edge including all events after a specified start (exclusive).
async fn after(&self, time: i64) -> Self {
self.update(self.ee.after(time))
}
- /// Shrinks both the start and end of the window.
+ /// Shrinks both the start and end of the window.
async fn shrink_window(&self, start: i64, end: i64) -> Self {
self.update(self.ee.shrink_window(start, end))
}
- /// Set the start of the window.
+ /// Set the start of the window.
async fn shrink_start(&self, start: i64) -> Self {
self.update(self.ee.shrink_start(start))
}
- /// Set the end of the window.
+ /// Set the end of the window.
async fn shrink_end(&self, end: i64) -> Self {
self.update(self.ee.shrink_end(end))
}
@@ -232,7 +238,7 @@ impl GqlEdges {
self.update(self.ee.explode_layers())
}
- /// Specify a sort order.
+ /// Specify a sort order from: source, destination, property, time. You can also reverse the ordering.
async fn sorted(&self, sort_bys: Vec) -> Self {
let self_clone = self.clone();
blocking_compute(move || {
@@ -322,7 +328,7 @@ impl GqlEdges {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
@@ -338,6 +344,7 @@ impl GqlEdges {
.await
}
+ /// Returns a list of all objects in the current selection of the collection. You should filter filter the collection first then call list.
async fn list(&self) -> Vec {
let self_clone = self.clone();
blocking_compute(move || self_clone.iter().collect()).await
diff --git a/raphtory-graphql/src/model/graph/filtering.rs b/raphtory-graphql/src/model/graph/filtering.rs
index dd769edee5..ca2b3693e1 100644
--- a/raphtory-graphql/src/model/graph/filtering.rs
+++ b/raphtory-graphql/src/model/graph/filtering.rs
@@ -47,23 +47,23 @@ pub enum GraphViewCollection {
Valid(bool),
/// Window between a start and end time.
Window(Window),
- /// Time.
+ /// View at a specified time.
At(i64),
- /// Latest time.
+ /// View at the latest time.
Latest(bool),
/// Snapshot at specified time.
SnapshotAt(i64),
/// Snapshot at latest time.
SnapshotLatest(bool),
- /// Time.
+ /// View before a specified time (end exclusive).
Before(i64),
- /// Time.
+ /// View after a specified time (start exclusive).
After(i64),
- /// Window between a start and end time.
+ /// Shrink a Window to a specified start and end time.
ShrinkWindow(Window),
- /// Time.
+ /// Set the window start to a specified time.
ShrinkStart(i64),
- /// Time.
+ /// Set the window end to a specified time.
ShrinkEnd(i64),
/// Node filter.
NodeFilter(NodeFilter),
@@ -75,7 +75,7 @@ pub enum GraphViewCollection {
pub enum NodesViewCollection {
/// Contains only the default layer.
DefaultLayer(bool),
- /// Latest time.
+ /// View at the latest time.
Latest(bool),
/// Snapshot at latest time.
SnapshotLatest(bool),
@@ -89,19 +89,19 @@ pub enum NodesViewCollection {
ExcludeLayer(String),
/// Window between a start and end time.
Window(Window),
- /// Time.
+ /// View at a specified time.
At(i64),
- /// Time.
+ /// Snapshot at specified time.
SnapshotAt(i64),
- /// Time.
+ /// View before a specified time (end exclusive).
Before(i64),
- /// Time.
+ /// View after a specified time (start exclusive).
After(i64),
- /// Window between a start and end time.
+ /// Shrink a Window to a specified start and end time.
ShrinkWindow(Window),
- /// Time.
+ /// Set the window start to a specified time.
ShrinkStart(i64),
- /// Time.
+ /// Set the window end to a specified time.
ShrinkEnd(i64),
/// Node filter.
NodeFilter(NodeFilter),
@@ -113,7 +113,7 @@ pub enum NodesViewCollection {
pub enum NodeViewCollection {
/// Contains only the default layer.
DefaultLayer(bool),
- /// Latest time.
+ /// View at the latest time.
Latest(bool),
/// Snapshot at latest time.
SnapshotLatest(bool),
@@ -129,17 +129,17 @@ pub enum NodeViewCollection {
ExcludeLayer(String),
/// Window between a start and end time.
Window(Window),
- /// Time.
+ /// View at a specified time.
At(i64),
- /// Time.
+ /// View before a specified time (end exclusive).
Before(i64),
- /// Time.
+ /// View after a specified time (start exclusive).
After(i64),
- /// Window between a start and end time.
+ /// Shrink a Window to a specified start and end time.
ShrinkWindow(Window),
- /// Time.
+ /// Set the window start to a specified time.
ShrinkStart(i64),
- /// Time.
+ /// Set the window end to a specified time.
ShrinkEnd(i64),
/// Node filter.
NodeFilter(NodeFilter),
@@ -165,17 +165,17 @@ pub enum EdgesViewCollection {
ExcludeLayer(String),
/// Window between a start and end time.
Window(Window),
- /// Time.
+ /// View at a specified time.
At(i64),
- /// Time.
+ /// View before a specified time (end exclusive).
Before(i64),
- /// Time.
+ /// View after a specified time (start exclusive).
After(i64),
- /// Window between a start and end time.
+ /// Shrink a Window to a specified start and end time.
ShrinkWindow(Window),
- /// Time.
+ /// Set the window start to a specified time.
ShrinkStart(i64),
- /// Time.
+ /// Set the window end to a specified time.
ShrinkEnd(i64),
}
@@ -199,17 +199,17 @@ pub enum EdgeViewCollection {
ExcludeLayer(String),
/// Window between a start and end time.
Window(Window),
- /// Time.
+ /// View at a specified time.
At(i64),
- /// Time.
+ /// View before a specified time (end exclusive).
Before(i64),
- /// Time.
+ /// View after a specified time (start exclusive).
After(i64),
- /// Window between a start and end time.
+ /// Shrink a Window to a specified start and end time.
ShrinkWindow(Window),
- /// Time.
+ /// Set the window start to a specified time.
ShrinkStart(i64),
- /// Time.
+ /// Set the window end to a specified time.
ShrinkEnd(i64),
}
@@ -231,25 +231,25 @@ pub enum PathFromNodeViewCollection {
ExcludeLayer(String),
/// Window between a start and end time.
Window(Window),
- /// Time.
+ /// View at a specified time.
At(i64),
- /// Time.
+ /// View before a specified time (end exclusive).
Before(i64),
- /// Time.
+ /// View after a specified time (start exclusive).
After(i64),
- /// Window between a start and end time.
+ /// Shrink a Window to a specified start and end time.
ShrinkWindow(Window),
- /// Time.
+ /// Set the window start to a specified time.
ShrinkStart(i64),
- /// Time.
+ /// Set the window end to a specified time.
ShrinkEnd(i64),
}
#[derive(InputObject, Clone, Debug)]
pub struct Window {
- /// Time.
+ /// Window start time.
pub start: i64,
- /// Time.
+ /// Window end time.
pub end: i64,
}
@@ -355,7 +355,7 @@ impl InputTypeName for Wrapped {}
#[derive(InputObject, Clone, Debug)]
pub struct NodeFieldFilter {
- /// Node Field filter.
+ /// Node component to compare against.
pub field: NodeField,
/// Operator filter.
pub operator: Operator,
@@ -399,7 +399,7 @@ pub enum EdgeFilter {
#[derive(InputObject, Clone, Debug)]
pub struct PropertyFilterExpr {
- /// Name.
+ /// Node property to compare against.
pub name: String,
/// Operator.
pub operator: Operator,
@@ -415,7 +415,7 @@ impl PropertyFilterExpr {
#[derive(InputObject, Clone, Debug)]
pub struct MetadataFilterExpr {
- /// Name.
+ /// Node metadata to compare against.
pub name: String,
/// Operator.
pub operator: Operator,
@@ -433,7 +433,7 @@ impl MetadataFilterExpr {
pub struct TemporalPropertyFilterExpr {
/// Name.
pub name: String,
- /// Temporal property type.
+ /// Type of temporal property. Choose from: any, latest.
pub temporal: TemporalType,
/// Operator.
pub operator: Operator,
diff --git a/raphtory-graphql/src/model/graph/graph.rs b/raphtory-graphql/src/model/graph/graph.rs
index 9d63e4755d..5577de3c9b 100644
--- a/raphtory-graphql/src/model/graph/graph.rs
+++ b/raphtory-graphql/src/model/graph/graph.rs
@@ -81,13 +81,13 @@ impl GqlGraph {
// LAYERS AND WINDOWS //
////////////////////////
- /// Returns the names of all layers in the graph.
+ /// Returns the names of all layers in the graphview.
async fn unique_layers(&self) -> Vec {
let self_clone = self.clone();
blocking_compute(move || self_clone.graph.unique_layers().map_into().collect()).await
}
- /// Returns a view containing only the default edge layer.
+ /// Returns a view containing only the default layer.
async fn default_layer(&self) -> GqlGraph {
self.apply(|g| g.default_layer())
}
@@ -114,7 +114,7 @@ impl GqlGraph {
self.apply(|g| g.exclude_valid_layers(name.clone()))
}
- /// Returns a subgraph of a specified set of nodes.
+ /// Returns a subgraph of a specified set of nodes which contains only the edges that connect nodes of the subgraph to each other.
async fn subgraph(&self, nodes: Vec) -> GqlGraph {
let self_clone = self.clone();
blocking_compute(move || self_clone.apply(|g| g.subgraph(nodes.clone()))).await
@@ -142,7 +142,7 @@ impl GqlGraph {
.await
}
- /// Creates a rolling window with the specified window size and an optional step..
+ /// Creates a rolling window with the specified window size and an optional step.
async fn rolling(
&self,
window: WindowDuration,
@@ -192,7 +192,7 @@ impl GqlGraph {
}
}
- /// Return a graph containing only the activity between start and end measured as milliseconds from epoch
+ /// Return a graph containing only the activity between start and end, by default raphtory stores times in milliseconds from the unix epoch.
async fn window(&self, start: i64, end: i64) -> GqlGraph {
self.apply(|g| g.window(start, end))
}
@@ -208,12 +208,12 @@ impl GqlGraph {
blocking_compute(move || self_clone.apply(|g| g.latest())).await
}
- /// Create a view including all events that have not been explicitly deleted at the specified time.
+ /// Create a view including all events that are valid at the specified time.
async fn snapshot_at(&self, time: i64) -> GqlGraph {
self.apply(|g| g.snapshot_at(time))
}
- /// Create a view including all events that have not been explicitly deleted at the latest time.
+ /// Create a view including all events that are valid at the latest time.
async fn snapshot_latest(&self) -> GqlGraph {
self.apply(|g| g.snapshot_latest())
}
@@ -233,12 +233,12 @@ impl GqlGraph {
self.apply(|g| g.shrink_window(start, end))
}
- /// Set the start of the window to the larger of start and self.start().
+ /// Set the start of the window to the larger of the specified value or current start.
async fn shrink_start(&self, start: i64) -> Self {
self.apply(|g| g.shrink_start(start))
}
- /// Set the end of the window to the smaller of end and self.end()
+ /// Set the end of the window to the smaller of the specified value or current end.
async fn shrink_end(&self, end: i64) -> Self {
self.apply(|g| g.shrink_end(end))
}
@@ -252,7 +252,7 @@ impl GqlGraph {
self.path.created_async().await
}
- /// Returns the graph's last opened timestamp.
+ /// Returns the graph's last opened timestamp according to system time.
async fn last_opened(&self) -> Result {
self.path.last_opened_async().await
}
@@ -336,6 +336,8 @@ impl GqlGraph {
}
/// Returns the number of nodes in the graph.
+ ///
+ /// Optionally takes a list of node ids to return a subset.
async fn count_nodes(&self) -> usize {
let self_clone = self.clone();
blocking_compute(move || self_clone.graph.count_nodes()).await
@@ -350,7 +352,7 @@ impl GqlGraph {
self.graph.has_node(name)
}
- /// Returns true if the graph contains the specified edge. Edges are specified by providing a source and destination node id.
+ /// Returns true if the graph contains the specified edge. Edges are specified by providing a source and destination node id. You can restrict the search to a specified layer.
async fn has_edge(&self, src: String, dst: String, layer: Option) -> bool {
match layer {
Some(name) => self
@@ -530,7 +532,7 @@ impl GqlGraph {
// INDEX SEARCH ////
////////////////////////
- /// Get index specification.
+ /// (Experimental) Get index specification.
async fn get_index_spec(&self) -> Result {
#[cfg(feature = "search")]
{
@@ -550,7 +552,7 @@ impl GqlGraph {
}
}
- /// Searches for nodes which match the given filter expression.
+ /// (Experimental) Searches for nodes which match the given filter expression.
///
/// Uses Tantivy's exact search.
async fn search_nodes(
@@ -576,7 +578,7 @@ impl GqlGraph {
}
}
- /// Searches for edges which match the given filter expression.
+ /// (Experimental) Searches the index for edges which match the given filter expression.
///
/// Uses Tantivy's exact search.
async fn search_edges(
@@ -602,6 +604,8 @@ impl GqlGraph {
}
}
+ /// Returns the specified graph view or if none is specified returns the default view.
+ /// This allows you to specify multiple operations together.
async fn apply_views(&self, views: Vec) -> Result {
let mut return_view: GqlGraph = GqlGraph::new(self.path.clone(), self.graph.clone());
for view in views {
diff --git a/raphtory-graphql/src/model/graph/meta_graph.rs b/raphtory-graphql/src/model/graph/meta_graph.rs
index 51fd8465e6..39e5df5fbc 100644
--- a/raphtory-graphql/src/model/graph/meta_graph.rs
+++ b/raphtory-graphql/src/model/graph/meta_graph.rs
@@ -47,43 +47,44 @@ impl MetaGraph {
}
#[ResolvedObjectFields]
+/// Metagraphs are a GraphQL specific object that wraps the normal graph functions. Metagraphs exist in memory and reduce the need to load full graphs from disk.
impl MetaGraph {
- /// Returns the metagraph name.
+ /// Returns the graph name.
async fn name(&self) -> Option {
self.folder.get_graph_name().ok()
}
- /// Returns path of metagraph.
+ /// Returns path of graph.
async fn path(&self) -> String {
self.folder.get_original_path_str().to_owned()
}
- /// Returns the timestamp for the creation of the metagraph.
+ /// Returns the timestamp for the creation of the graph.
async fn created(&self) -> Result {
self.folder.created_async().await
}
- /// Returns the metagraph's last opened timestamp.
+ /// Returns the graph's last opened timestamp according to system time.
async fn last_opened(&self) -> Result {
self.folder.last_opened_async().await
}
- /// Returns the metagraph's last updated timestamp.
+ /// Returns the graph's last updated timestamp.
async fn last_updated(&self) -> Result {
self.folder.last_updated_async().await
}
- /// Returns the number of nodes in the metagraph.
+ /// Returns the number of nodes in the graph.
async fn node_count(&self) -> Result {
Ok(self.meta().await?.node_count)
}
- /// Returns the number of edges in the metagraph.
+ /// Returns the number of edges in the graph.
async fn edge_count(&self) -> Result {
Ok(self.meta().await?.edge_count)
}
- /// Returns the metadata of the metagraph.
+ /// Returns the metadata of the graph.
async fn metadata(&self) -> Result, GraphError> {
Ok(self
.meta()
diff --git a/raphtory-graphql/src/model/graph/mod.rs b/raphtory-graphql/src/model/graph/mod.rs
index cb8ad9a910..99f6de67fd 100644
--- a/raphtory-graphql/src/model/graph/mod.rs
+++ b/raphtory-graphql/src/model/graph/mod.rs
@@ -22,6 +22,8 @@ mod windowset;
#[derive(OneOfInput, Clone)]
pub(crate) enum WindowDuration {
/// Duration of window period.
+ ///
+ /// Choose from:
Duration(String),
/// Time.
Epoch(u64),
diff --git a/raphtory-graphql/src/model/graph/mutable_graph.rs b/raphtory-graphql/src/model/graph/mutable_graph.rs
index d02407ec21..2864de7e52 100644
--- a/raphtory-graphql/src/model/graph/mutable_graph.rs
+++ b/raphtory-graphql/src/model/graph/mutable_graph.rs
@@ -47,15 +47,15 @@ pub struct NodeAddition {
#[derive(InputObject, Clone)]
pub struct EdgeAddition {
- /// Source node
+ /// Source node.
src: String,
- /// Destination node
+ /// Destination node.
dst: String,
- /// Layer
+ /// Layer.
layer: Option,
- /// Metadata
+ /// Metadata.
metadata: Option>,
- // Update events
+ // Update events.
updates: Option>,
}
@@ -91,17 +91,17 @@ fn as_properties(
#[ResolvedObjectFields]
impl GqlMutableGraph {
- /// Get the non-mutable graph
+ /// Get the non-mutable graph.
async fn graph(&self) -> GqlGraph {
GqlGraph::new(self.path.clone(), self.graph.graph.clone())
}
- /// Get mutable existing node
+ /// Get mutable existing node.
async fn node(&self, name: String) -> Option {
self.graph.node(name).map(|n| n.into())
}
- /// Add a new node or add updates to an existing node
+ /// Add a new node or add updates to an existing node.
async fn add_node(
&self,
time: i64,
@@ -126,7 +126,7 @@ impl GqlMutableGraph {
.await
}
- /// Create a new node or fail if it already exists
+ /// Create a new node or fail if it already exists.
async fn create_node(
&self,
time: i64,
@@ -151,7 +151,7 @@ impl GqlMutableGraph {
.await
}
- /// Add a batch of nodes
+ /// Add a batch of nodes.
async fn add_nodes(&self, nodes: Vec) -> Result {
let self_clone = self.clone();
@@ -183,7 +183,7 @@ impl GqlMutableGraph {
})
.await;
- // Generate embeddings
+ // Generate embeddings.
let nodes: Vec<_> = nodes.into_iter().collect::, _>>()?;
self.graph.update_node_embeddings(nodes).await?;
@@ -195,12 +195,12 @@ impl GqlMutableGraph {
.await
}
- /// Get a mutable existing edge
+ /// Get a mutable existing edge.
async fn edge(&self, src: String, dst: String) -> Option {
self.graph.edge(src, dst).map(|e| e.into())
}
- /// Add a new edge or add updates to an existing edge
+ /// Add a new edge or add updates to an existing edge.
async fn add_edge(
&self,
time: i64,
@@ -227,7 +227,7 @@ impl GqlMutableGraph {
.await
}
- /// Add a batch of edges
+ /// Add a batch of edges.
async fn add_edges(&self, edges: Vec) -> Result {
let self_clone = self.clone();
@@ -259,7 +259,7 @@ impl GqlMutableGraph {
})
.await;
- // Generate embeddings
+ // Generate embeddings.
let edge_pairs: Vec<_> = edges
.into_iter()
.collect::, _>>()? // Return 1st encountered error
@@ -277,7 +277,7 @@ impl GqlMutableGraph {
.await
}
- /// Mark an edge as deleted (creates the edge if it did not exist)
+ /// Mark an edge as deleted (creates the edge if it did not exist).
async fn delete_edge(
&self,
time: i64,
@@ -299,7 +299,7 @@ impl GqlMutableGraph {
.await
}
- /// Add temporal properties to graph
+ /// Add temporal properties to graph.
async fn add_properties(
&self,
t: i64,
@@ -316,7 +316,7 @@ impl GqlMutableGraph {
.await
}
- /// Add metadata to graph (errors if the property already exists)
+ /// Add metadata to graph (errors if the property already exists).
async fn add_metadata(&self, properties: Vec) -> Result {
let self_clone = self.clone();
blocking_compute(move || {
@@ -327,7 +327,7 @@ impl GqlMutableGraph {
.await
}
- /// Update metadata of the graph (overwrites existing values)
+ /// Update metadata of the graph (overwrites existing values).
async fn update_metadata(&self, properties: Vec) -> Result {
let self_clone = self.clone();
blocking_compute(move || {
@@ -376,17 +376,17 @@ impl From> for GqlMutableNode {
#[ResolvedObjectFields]
impl GqlMutableNode {
- /// Use to check if adding the node was successful
+ /// Use to check if adding the node was successful.
async fn success(&self) -> bool {
true
}
- /// Get the non-mutable Node
+ /// Get the non-mutable Node.
async fn node(&self) -> GqlNode {
self.node.clone().into()
}
- /// Add metadata to the node (errors if the property already exists)
+ /// Add metadata to the node (errors if the property already exists).
async fn add_metadata(&self, properties: Vec) -> Result {
let self_clone = self.clone();
spawn(async move {
@@ -399,7 +399,7 @@ impl GqlMutableNode {
.unwrap()
}
- /// Set the node type (errors if the node already has a non-default type)
+ /// Set the node type (errors if the node already has a non-default type).
async fn set_node_type(&self, new_type: String) -> Result {
let self_clone = self.clone();
spawn(async move {
@@ -412,7 +412,7 @@ impl GqlMutableNode {
.unwrap()
}
- /// Update metadata of the node (overwrites existing property values)
+ /// Update metadata of the node (overwrites existing property values).
async fn update_metadata(&self, properties: Vec) -> Result {
let self_clone = self.clone();
spawn(async move {
@@ -427,7 +427,7 @@ impl GqlMutableNode {
.unwrap()
}
- /// Add temporal property updates to the node
+ /// Add temporal property updates to the node.
async fn add_updates(
&self,
time: i64,
@@ -461,27 +461,27 @@ impl From> for GqlMutableEdge {
#[ResolvedObjectFields]
impl GqlMutableEdge {
- /// Use to check if adding the edge was successful
+ /// Use to check if adding the edge was successful.
async fn success(&self) -> bool {
true
}
- /// Get the non-mutable edge for querying
+ /// Get the non-mutable edge for querying.
async fn edge(&self) -> GqlEdge {
self.edge.clone().into()
}
- /// Get the mutable source node of the edge
+ /// Get the mutable source node of the edge.
async fn src(&self) -> GqlMutableNode {
self.edge.src().into()
}
- /// Get the mutable destination node of the edge
+ /// Get the mutable destination node of the edge.
async fn dst(&self) -> GqlMutableNode {
self.edge.dst().into()
}
- /// Mark the edge as deleted at time time
+ /// Mark the edge as deleted at time time.
async fn delete(&self, time: i64, layer: Option) -> Result {
let self_clone = self.clone();
spawn(async move {
@@ -494,9 +494,9 @@ impl GqlMutableEdge {
.unwrap()
}
- /// Add metadata to the edge (errors if the value already exists)
+ /// Add metadata to the edge (errors if the value already exists).
///
- /// If this is called after add_edge , the layer is inherited from the add_edge and does not
+ /// If this is called after add_edge, the layer is inherited from the add_edge and does not
/// need to be specified again.
async fn add_metadata(
&self,
@@ -516,9 +516,9 @@ impl GqlMutableEdge {
.unwrap()
}
- /// Update metadata of the edge (existing values are overwritten)
+ /// Update metadata of the edge (existing values are overwritten).
///
- /// If this is called after add_edge , the layer is inherited from the add_edge and does not
+ /// If this is called after add_edge, the layer is inherited from the add_edge and does not
/// need to be specified again.
async fn update_metadata(
&self,
@@ -538,9 +538,9 @@ impl GqlMutableEdge {
.unwrap()
}
- /// Add temporal property updates to the edge
+ /// Add temporal property updates to the edge.
///
- /// If this is called after add_edge , the layer is inherited from the add_edge and does not
+ /// If this is called after add_edge, the layer is inherited from the add_edge and does not
/// need to be specified again.
async fn add_updates(
&self,
@@ -607,7 +607,7 @@ mod tests {
let config = AppConfig::default();
let mut data = Data::new(tmp_dir.path(), &config);
- // Override the embedding function with a mock for testing
+ // Override the embedding function with a mock for testing.
data.embedding_conf = Some(EmbeddingConf {
cache: VectorCache::in_memory(fake_embedding),
global_template: Some(custom_template()),
@@ -750,7 +750,7 @@ mod tests {
async fn test_add_edges_simple() {
let (mutable_graph, _tmp_dir) = create_mutable_graph().await;
- // First add some nodes
+ // First add some nodes.
let nodes = vec![
NodeAddition {
name: "node1".to_string(),
@@ -775,7 +775,7 @@ mod tests {
let result = mutable_graph.add_nodes(nodes).await;
assert!(result.is_ok());
- // Now add edges between them
+ // Now add edges between them.
let edges = vec![
EdgeAddition {
src: "node1".to_string(),
@@ -807,7 +807,7 @@ mod tests {
assert!(result.is_ok());
assert!(result.unwrap());
- // Test that edge embeddings were generated
+ // Test that edge embeddings were generated.
let query = "node1 appeared with node2".to_string();
let embedding = &fake_embedding(vec![query]).await.unwrap().remove(0);
let limit = 5;
diff --git a/raphtory-graphql/src/model/graph/node.rs b/raphtory-graphql/src/model/graph/node.rs
index 47264b2e07..58bf50357c 100644
--- a/raphtory-graphql/src/model/graph/node.rs
+++ b/raphtory-graphql/src/model/graph/node.rs
@@ -44,6 +44,9 @@ impl
}
#[ResolvedObjectFields]
+/// A collection of edges.
+///
+/// Collections can be filtered and used to create lists.
impl GqlNode {
/// Returns the unique id of the node.
async fn id(&self) -> String {
@@ -59,7 +62,7 @@ impl GqlNode {
// LAYERS AND WINDOWS //
////////////////////////
- /// Return a view of the node containing only the default edge layer.
+ /// Return a view of the node containing only the default layer.
async fn default_layer(&self) -> GqlNode {
self.vv.default_layer().into()
}
@@ -70,23 +73,25 @@ impl GqlNode {
blocking_compute(move || self_clone.vv.valid_layers(names).into()).await
}
- /// Return a view of node containing all layers except those specified.
+ /// Returns a collection containing nodes belonging to all layers except the excluded list of layers.
async fn exclude_layers(&self, names: Vec) -> GqlNode {
let self_clone = self.clone();
blocking_compute(move || self_clone.vv.exclude_valid_layers(names).into()).await
}
- /// Return a view of node containing the specified layer.
+ /// Returns a collection containing nodes belonging to the specified layer.
async fn layer(&self, name: String) -> GqlNode {
self.vv.valid_layers(name).into()
}
- /// Return a view of node containing all layers except those specified.
+ /// Returns a collection containing nodes belonging to all layers except the excluded layer.
async fn exclude_layer(&self, name: String) -> GqlNode {
self.vv.exclude_valid_layers(name).into()
}
/// Creates a WindowSet with the specified window size and optional step using a rolling window.
+ ///
+ /// Returns a collection of collections. This means that item in the window set is a collection of nodes.
async fn rolling(
&self,
window: WindowDuration,
@@ -142,12 +147,12 @@ impl GqlNode {
blocking_compute(move || self_clone.vv.latest().into()).await
}
- /// Create a view of the node including all events that have not been explicitly deleted at the specified time.
+ /// Create a view of the node including all events that are valid at the specified time.
async fn snapshot_at(&self, time: i64) -> GqlNode {
self.vv.snapshot_at(time).into()
}
- /// Create a view of the node including all events that have not been explicitly deleted at the latest time.
+ /// Create a view of the node including all events that are valid at the latest time.
async fn snapshot_latest(&self) -> GqlNode {
let self_clone = self.clone();
blocking_compute(move || self_clone.vv.snapshot_latest().into()).await
@@ -163,12 +168,12 @@ impl GqlNode {
self.vv.after(time).into()
}
- /// Shrink both the start and end of the window.
+ /// Shrink a Window to a specified start and end time, if these are earlier and later than the current start and end respectively.
async fn shrink_window(&self, start: i64, end: i64) -> Self {
self.vv.shrink_window(start, end).into()
}
- /// Set the start of the window to the larger of a specified start time and self.start().
+ /// Set the start of the window to the larger of a specified start time and self.start().
async fn shrink_start(&self, start: i64) -> Self {
self.vv.shrink_start(start).into()
}
@@ -237,6 +242,7 @@ impl GqlNode {
blocking_compute(move || self_clone.vv.earliest_time()).await
}
+ /// Returns the time of the first update made to the node.
async fn first_update(&self) -> Option {
let self_clone = self.clone();
blocking_compute(move || self_clone.vv.history().first().cloned()).await
@@ -248,6 +254,7 @@ impl GqlNode {
blocking_compute(move || self_clone.vv.latest_time()).await
}
+ /// Returns the time of the last update made to the node.
async fn last_update(&self) -> Option {
let self_clone = self.clone();
blocking_compute(move || self_clone.vv.history().last().cloned()).await
@@ -306,7 +313,7 @@ impl GqlNode {
//// EDGE GETTERS //////
////////////////////////
- /// Returns the number of edges connected to this node.
+ /// Returns the number of unique counter parties for this node.
async fn degree(&self) -> usize {
let self_clone = self.clone();
blocking_compute(move || self_clone.vv.degree()).await
@@ -354,10 +361,12 @@ impl GqlNode {
GqlPathFromNode::new(self.vv.neighbours())
}
+ /// Returns the number of neighbours that have at least one in-going edge to this node.
async fn in_neighbours<'a>(&self) -> GqlPathFromNode {
GqlPathFromNode::new(self.vv.in_neighbours())
}
+ /// Returns the number of neighbours that have at least one out-going edge from this node.
async fn out_neighbours(&self) -> GqlPathFromNode {
GqlPathFromNode::new(self.vv.out_neighbours())
}
diff --git a/raphtory-graphql/src/model/graph/nodes.rs b/raphtory-graphql/src/model/graph/nodes.rs
index 2b225af5e9..292dd5187f 100644
--- a/raphtory-graphql/src/model/graph/nodes.rs
+++ b/raphtory-graphql/src/model/graph/nodes.rs
@@ -135,12 +135,12 @@ impl GqlNodes {
blocking_compute(move || self_clone.update(self_clone.nn.latest())).await
}
- /// Create a view of the nodes including all events that have not been explicitly deleted at the specified time.
+ /// Create a view of the nodes including all events that are valid at the specified time.
async fn snapshot_at(&self, time: i64) -> Self {
self.update(self.nn.snapshot_at(time))
}
- /// Create a view of the nodes including all events that have not been explicitly deleted at the latest time.
+ /// Create a view of the nodes including all events that are valid at the latest time.
async fn snapshot_latest(&self) -> Self {
let self_clone = self.clone();
blocking_compute(move || self_clone.update(self_clone.nn.snapshot_latest())).await
@@ -161,7 +161,7 @@ impl GqlNodes {
self.update(self.nn.shrink_window(start, end))
}
- /// Set the start of the window to the larger of a specified start time and self.start().
+ /// Set the start of the window to the larger of a specified start time and self.start().
async fn shrink_start(&self, start: i64) -> Self {
self.update(self.nn.shrink_start(start))
}
@@ -323,7 +323,7 @@ impl GqlNodes {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
diff --git a/raphtory-graphql/src/model/graph/path_from_node.rs b/raphtory-graphql/src/model/graph/path_from_node.rs
index 2e2efebd84..57547e819d 100644
--- a/raphtory-graphql/src/model/graph/path_from_node.rs
+++ b/raphtory-graphql/src/model/graph/path_from_node.rs
@@ -120,13 +120,13 @@ impl GqlPathFromNode {
self.update(self.nn.at(time))
}
- /// Create a view of the PathFromNode including all events that have not been explicitly deleted at the latest time.
+ /// Create a view of the PathFromNode including all events that are valid at the latest time.
async fn snapshot_latest(&self) -> Self {
let self_clone = self.clone();
blocking_compute(move || self_clone.update(self_clone.nn.snapshot_latest())).await
}
- /// Create a view of the PathFromNode including all events that have not been explicitly deleted at the specified time.
+ /// Create a view of the PathFromNode including all events that are valid at the specified time.
async fn snapshot_at(&self, time: i64) -> Self {
self.update(self.nn.snapshot_at(time))
}
@@ -194,7 +194,7 @@ impl GqlPathFromNode {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
@@ -221,6 +221,7 @@ impl GqlPathFromNode {
blocking_compute(move || self_clone.nn.name().collect()).await
}
+ /// Takes a specified selection of views and applies them in given order.
async fn apply_views(
&self,
views: Vec,
diff --git a/raphtory-graphql/src/model/graph/windowset.rs b/raphtory-graphql/src/model/graph/windowset.rs
index 7ece58d1e5..dbd03ef828 100644
--- a/raphtory-graphql/src/model/graph/windowset.rs
+++ b/raphtory-graphql/src/model/graph/windowset.rs
@@ -35,7 +35,7 @@ impl GqlGraphWindowSet {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
@@ -93,7 +93,7 @@ impl GqlNodeWindowSet {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
@@ -142,7 +142,7 @@ impl GqlNodesWindowSet {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
@@ -191,7 +191,7 @@ impl GqlPathFromNodeWindowSet {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
@@ -247,7 +247,7 @@ impl GqlEdgeWindowSet {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
@@ -296,7 +296,7 @@ impl GqlEdgesWindowSet {
/// Fetch one page with a number of items up to a specified limit, optionally offset by a specified amount.
/// The page_index sets the number of pages to skip (defaults to 0).
///
- /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
+ /// For example, if page(5, 2, 1) is called, a page with 5 items, offset by 11 items (2 pages of 5 + 1),
/// will be returned.
async fn page(
&self,
diff --git a/raphtory-graphql/src/model/mod.rs b/raphtory-graphql/src/model/mod.rs
index ba0731bf6f..eadf0ec654 100644
--- a/raphtory-graphql/src/model/mod.rs
+++ b/raphtory-graphql/src/model/mod.rs
@@ -184,7 +184,7 @@ pub(crate) struct Mut(MutRoot);
#[MutationFields]
impl Mut {
- /// Returns a plugin.
+ /// Returns a collection of mutation plugins.
async fn plugins<'a>(_ctx: &Context<'a>) -> MutationPlugin {
MutationPlugin::default()
}
@@ -243,10 +243,10 @@ impl Mut {
Ok(true)
}
- /// Upload graph file from a path on the client.
+ /// Upload a graph file from a path on the client using GQL multipart uploading.
///
/// Returns::
- /// name of the new graph
+ /// name of the new graph
async fn upload_graph<'a>(
ctx: &Context<'a>,
path: String,
@@ -272,7 +272,7 @@ impl Mut {
/// Send graph bincode as base64 encoded string.
///
/// Returns::
- /// path of the new graph
+ /// path of the new graph
async fn send_graph<'a>(
ctx: &Context<'a>,
path: &str,
@@ -291,7 +291,7 @@ impl Mut {
/// Returns a subgraph given a set of nodes from an existing graph in the server.
///
/// Returns::
- /// name of the new graph
+ /// name of the new graph
async fn create_subgraph<'a>(
ctx: &Context<'a>,
parent_path: &str,
@@ -310,7 +310,7 @@ impl Mut {
Ok(new_path)
}
- /// Creates search index.
+ /// (Experimental) Creates search index.
async fn create_index<'a>(
ctx: &Context<'a>,
path: &str,
diff --git a/raphtory-graphql/src/observability/open_telemetry.rs b/raphtory-graphql/src/observability/open_telemetry.rs
index 9abc95a1a4..c1f3864baa 100644
--- a/raphtory-graphql/src/observability/open_telemetry.rs
+++ b/raphtory-graphql/src/observability/open_telemetry.rs
@@ -29,7 +29,7 @@ pub struct OpenTelemetry {
}
impl OpenTelemetry {
- /// Use tracer to create an OpenTelemetry extension.
+ /// Use tracer to create an OpenTelemetry extension.
pub fn new(tracer: T) -> OpenTelemetry
where
T: Tracer + Send + Sync + 'static,
diff --git a/raphtory-graphql/src/python/client/mod.rs b/raphtory-graphql/src/python/client/mod.rs
index 64bcc6fce9..528e9d7c30 100644
--- a/raphtory-graphql/src/python/client/mod.rs
+++ b/raphtory-graphql/src/python/client/mod.rs
@@ -14,8 +14,8 @@ pub mod remote_node;
/// A temporal update
///
/// Arguments:
-/// time (TimeInput): the timestamp for the update
-/// properties (PropInput, optional): the properties for the update
+/// time (TimeInput): the timestamp for the update
+/// properties (PropInput, optional): the properties for the update
#[derive(Clone)]
#[pyclass(name = "RemoteUpdate", module = "raphtory.graphql")]
pub struct PyUpdate {
@@ -66,10 +66,10 @@ impl PyUpdate {
/// Node addition update
///
/// Arguments:
-/// name (GID): the id of the node
-/// node_type (str, optional): the node type
-/// metadata (PropInput, optional): the metadata
-/// updates (list[RemoteUpdate], optional): the temporal updates
+/// name (GID): the id of the node
+/// node_type (str, optional): the node type
+/// metadata (PropInput, optional): the metadata
+/// updates (list[RemoteUpdate], optional): the temporal updates
#[derive(Clone)]
#[pyclass(name = "RemoteNodeAddition", module = "raphtory.graphql")]
pub struct PyNodeAddition {
@@ -143,11 +143,11 @@ impl PyNodeAddition {
/// An edge update
///
/// Arguments:
-/// src (GID): the id of the source node
-/// dst (GID): the id of the destination node
-/// layer (str, optional): the layer for the update
-/// metadata (PropInput, optional): the metadata for the edge
-/// updates (list[RemoteUpdate], optional): the temporal updates for the edge
+/// src (GID): the id of the source node
+/// dst (GID): the id of the destination node
+/// layer (str, optional): the layer for the update
+/// metadata (PropInput, optional): the metadata for the edge
+/// updates (list[RemoteUpdate], optional): the temporal updates for the edge
#[derive(Clone)]
#[pyclass(name = "RemoteEdgeAddition", module = "raphtory.graphql")]
pub struct PyEdgeAddition {
@@ -325,7 +325,7 @@ pub(crate) fn build_query(template: &str, context: Value) -> Result bool {
is_online(&self.url)
}
@@ -153,11 +153,11 @@ impl PyRaphtoryClient {
/// Make a GraphQL query against the server.
///
/// Arguments:
- /// query (str): the query to make.
- /// variables (dict[str, Any], optional): a dict of variables present on the query and their values.
+ /// query (str): the query to make.
+ /// variables (dict[str, Any], optional): a dict of variables present on the query and their values.
///
/// Returns:
- /// dict[str, Any]: The data field from the graphQL response.
+ /// dict[str, Any]: The data field from the graphQL response.
#[pyo3(signature = (query, variables = None))]
pub(crate) fn query<'py>(
&self,
@@ -178,12 +178,12 @@ impl PyRaphtoryClient {
/// Send a graph to the server
///
/// Arguments:
- /// path (str): the path of the graph
- /// graph (Graph | PersistentGraph): the graph to send
- /// overwrite (bool): overwrite existing graph. Defaults to False.
+ /// path (str): the path of the graph
+ /// graph (Graph | PersistentGraph): the graph to send
+ /// overwrite (bool): overwrite existing graph. Defaults to False.
///
/// Returns:
- /// dict[str, Any]: The data field from the graphQL response after executing the mutation.
+ /// dict[str, Any]: The data field from the graphQL response after executing the mutation.
#[pyo3(signature = (path, graph, overwrite = false))]
fn send_graph(&self, path: String, graph: MaterializedGraph, overwrite: bool) -> PyResult<()> {
let encoded_graph = encode_graph(graph)?;
@@ -214,15 +214,15 @@ impl PyRaphtoryClient {
}
}
- /// Upload graph file from a path file_path on the client
+ /// Upload graph file from a path file_path on the client
///
/// Arguments:
- /// path (str): the name of the graph
- /// file_path (str): the path of the graph on the client
- /// overwrite (bool): overwrite existing graph. Defaults to False.
+ /// path (str): the name of the graph
+ /// file_path (str): the path of the graph on the client
+ /// overwrite (bool): overwrite existing graph. Defaults to False.
///
/// Returns:
- /// dict[str, Any]: The data field from the graphQL response after executing the mutation.
+ /// dict[str, Any]: The data field from the graphQL response after executing the mutation.
#[pyo3(signature = (path, file_path, overwrite = false))]
fn upload_graph(&self, path: String, file_path: String, overwrite: bool) -> PyResult<()> {
let remote_client = self.clone();
@@ -293,14 +293,14 @@ impl PyRaphtoryClient {
})
}
- /// Copy graph from a path path on the server to a new_path on the server
+ /// Copy graph from a path path on the server to a new_path on the server
///
/// Arguments:
- /// path (str): the path of the graph to be copied
- /// new_path (str): the new path of the copied graph
+ /// path (str): the path of the graph to be copied
+ /// new_path (str): the new path of the copied graph
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (path, new_path))]
fn copy_graph(&self, path: String, new_path: String) -> PyResult<()> {
let query = r#"
@@ -327,14 +327,14 @@ impl PyRaphtoryClient {
Ok(())
}
- /// Move graph from a path path on the server to a new_path on the server
+ /// Move graph from a path path on the server to a new_path on the server
///
/// Arguments:
- /// path (str): the path of the graph to be moved
- /// new_path (str): the new path of the moved graph
+ /// path (str): the path of the graph to be moved
+ /// new_path (str): the new path of the moved graph
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (path, new_path))]
fn move_graph(&self, path: String, new_path: String) -> PyResult<()> {
let query = r#"
@@ -361,13 +361,13 @@ impl PyRaphtoryClient {
Ok(())
}
- /// Delete graph from a path path on the server
+ /// Delete graph from a path path on the server
///
/// Arguments:
- /// path (str): the path of the graph to be deleted
+ /// path (str): the path of the graph to be deleted
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (path))]
fn delete_graph(&self, path: String) -> PyResult<()> {
let query = r#"
@@ -390,16 +390,16 @@ impl PyRaphtoryClient {
Ok(())
}
- /// Receive graph from a path path on the server
+ /// Receive graph from a path path on the server
///
/// Note:
- /// This downloads a copy of the graph. Modifications are not persistet to the server.
+ /// This downloads a copy of the graph. Modifications are not persistet to the server.
///
/// Arguments:
- /// path (str): the path of the graph to be received
+ /// path (str): the path of the graph to be received
///
/// Returns:
- /// Union[Graph, PersistentGraph]: A copy of the graph
+ /// Union[Graph, PersistentGraph]: A copy of the graph
fn receive_graph(&self, path: String) -> PyResult {
let query = r#"
query ReceiveGraph($path: String!) {
@@ -419,14 +419,14 @@ impl PyRaphtoryClient {
}
}
- /// Create a new empty Graph on the server at path
+ /// Create a new empty Graph on the server at path
///
/// Arguments:
- /// path (str): the path of the graph to be created
- /// graph_type (Literal["EVENT", "PERSISTENT"]): the type of graph that should be created - this can be EVENT or PERSISTENT
+ /// path (str): the path of the graph to be created
+ /// graph_type (Literal["EVENT", "PERSISTENT"]): the type of graph that should be created - this can be EVENT or PERSISTENT
///
/// Returns:
- /// None:
+ /// None:
///
fn new_graph(&self, path: String, graph_type: String) -> PyResult<()> {
let query = r#"
@@ -451,13 +451,13 @@ impl PyRaphtoryClient {
Ok(())
}
- /// Get a RemoteGraph reference to a graph on the server at path
+ /// Get a RemoteGraph reference to a graph on the server at path
///
/// Arguments:
- /// path (str): the path of the graph to be created
+ /// path (str): the path of the graph to be created
///
/// Returns:
- /// RemoteGraph: the remote graph reference
+ /// RemoteGraph: the remote graph reference
///
fn remote_graph(&self, path: String) -> PyRemoteGraph {
PyRemoteGraph {
@@ -469,12 +469,12 @@ impl PyRaphtoryClient {
/// Create Index for graph on the server at 'path'
///
/// Arguments:
- /// path (str): the path of the graph to be created
- /// index_spec (RemoteIndexSpec): spec specifying the properties that need to be indexed
- /// in_ram (bool): create index in ram
+ /// path (str): the path of the graph to be created
+ /// index_spec (RemoteIndexSpec): spec specifying the properties that need to be indexed
+ /// in_ram (bool): create index in ram
///
/// Returns:
- /// None:
+ /// None:
///
#[pyo3(signature = (path, index_spec, in_ram = true))]
fn create_index(
diff --git a/raphtory-graphql/src/python/client/remote_edge.rs b/raphtory-graphql/src/python/client/remote_edge.rs
index f87192c67a..9dfa85a074 100644
--- a/raphtory-graphql/src/python/client/remote_edge.rs
+++ b/raphtory-graphql/src/python/client/remote_edge.rs
@@ -39,12 +39,12 @@ impl PyRemoteEdge {
/// The updates are time-stamped, meaning they are applied at the specified time.
///
/// Parameters:
- /// t (int | str | datetime): The timestamp at which the updates should be applied.
- /// properties (dict[str, PropValue], optional): A dictionary of properties to update.
- /// layer (str, optional): The layer you want the updates to be applied.
+ /// t (int | str | datetime): The timestamp at which the updates should be applied.
+ /// properties (dict[str, PropValue], optional): A dictionary of properties to update.
+ /// layer (str, optional): The layer you want the updates to be applied.
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (t, properties=None, layer=None))]
fn add_updates(
&self,
@@ -81,11 +81,11 @@ impl PyRemoteEdge {
/// Mark the edge as deleted at the specified time.
///
/// Parameters:
- /// t (int | str | datetime): The timestamp at which the deletion should be applied.
- /// layer (str, optional): The layer you want the deletion applied to.
+ /// t (int | str | datetime): The timestamp at which the deletion should be applied.
+ /// layer (str, optional): The layer you want the deletion applied to.
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (t, layer=None))]
fn delete(&self, py: Python, t: PyTime, layer: Option<&str>) -> Result<(), GraphError> {
let template = r#"
@@ -117,11 +117,11 @@ impl PyRemoteEdge {
/// change over time. This metadata is fundamental information of the edge.
///
/// Parameters:
- /// properties (dict[str, PropValue]): A dictionary of properties to be added to the edge.
- /// layer (str, optional): The layer you want these properties to be added on to.
+ /// properties (dict[str, PropValue]): A dictionary of properties to be added to the edge.
+ /// layer (str, optional): The layer you want these properties to be added on to.
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (properties, layer=None))]
fn add_metadata(
&self,
@@ -158,11 +158,11 @@ impl PyRemoteEdge {
/// change over time. These properties are fundamental attributes of the edge.
///
/// Parameters:
- /// properties (dict[str, PropValue]): A dictionary of properties to be added to the edge.
- /// layer (str, optional): The layer you want these properties to be added on to.
+ /// properties (dict[str, PropValue]): A dictionary of properties to be added to the edge.
+ /// layer (str, optional): The layer you want these properties to be added on to.
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (properties, layer=None))]
pub fn update_metadata(
&self,
diff --git a/raphtory-graphql/src/python/client/remote_graph.rs b/raphtory-graphql/src/python/client/remote_graph.rs
index ecf8ac7c4c..ad6377ebaf 100644
--- a/raphtory-graphql/src/python/client/remote_graph.rs
+++ b/raphtory-graphql/src/python/client/remote_graph.rs
@@ -20,10 +20,10 @@ impl PyRemoteGraph {
/// Gets a remote node with the specified id
///
/// Arguments:
- /// id (str | int): the node id
+ /// id (str | int): the node id
///
/// Returns:
- /// RemoteNode: the remote node reference
+ /// RemoteNode: the remote node reference
pub fn node(&self, id: GID) -> PyRemoteNode {
PyRemoteNode::new(self.path.clone(), self.client.clone(), id.to_string())
}
@@ -31,11 +31,11 @@ impl PyRemoteGraph {
/// Gets a remote edge with the specified source and destination nodes
///
/// Arguments:
- /// src (str | int): the source node id
- /// dst (str | int): the destination node id
+ /// src (str | int): the source node id
+ /// dst (str | int): the destination node id
///
/// Returns:
- /// RemoteEdge: the remote edge reference
+ /// RemoteEdge: the remote edge reference
#[pyo3(signature = (src, dst))]
pub fn edge(&self, src: GID, dst: GID) -> PyRemoteEdge {
PyRemoteEdge::new(
@@ -49,10 +49,10 @@ impl PyRemoteGraph {
/// Batch add node updates to the remote graph
///
/// Arguments:
- /// updates (List[RemoteNodeAddition]): The list of updates you want to apply to the remote graph
+ /// updates (List[RemoteNodeAddition]): The list of updates you want to apply to the remote graph
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (updates))]
pub fn add_nodes(&self, py: Python, updates: Vec) -> Result<(), GraphError> {
let template = r#"
@@ -119,10 +119,10 @@ impl PyRemoteGraph {
/// Batch add edge updates to the remote graph
///
/// Arguments:
- /// updates (List[RemoteEdgeAddition]): The list of updates you want to apply to the remote graph
+ /// updates (List[RemoteEdgeAddition]): The list of updates you want to apply to the remote graph
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (updates))]
pub fn add_edges(&self, py: Python, updates: Vec) -> Result<(), GraphError> {
let template = r#"
@@ -190,12 +190,12 @@ impl PyRemoteGraph {
/// Adds a new node with the given id and properties to the remote graph.
///
/// Arguments:
- /// timestamp (int | str | datetime): The timestamp of the node.
- /// id (str | int): The id of the node.
- /// properties (dict, optional): The properties of the node.
- /// node_type (str, optional): The optional string which will be used as a node type
+ /// timestamp (int | str | datetime): The timestamp of the node.
+ /// id (str | int): The id of the node.
+ /// properties (dict, optional): The properties of the node.
+ /// node_type (str, optional): The optional string which will be used as a node type
/// Returns:
- /// RemoteNode: the new remote node
+ /// RemoteNode: the new remote node
#[pyo3(signature = (timestamp, id, properties = None, node_type = None))]
pub fn add_node(
&self,
@@ -236,12 +236,12 @@ impl PyRemoteGraph {
/// Create a new node with the given id and properties to the remote graph and fail if the node already exists.
///
/// Arguments:
- /// timestamp (int | str | datetime): The timestamp of the node.
- /// id (str | int): The id of the node.
- /// properties (dict, optional): The properties of the node.
- /// node_type (str, optional): The optional string which will be used as a node type
+ /// timestamp (int | str | datetime): The timestamp of the node.
+ /// id (str | int): The id of the node.
+ /// properties (dict, optional): The properties of the node.
+ /// node_type (str, optional): The optional string which will be used as a node type
/// Returns:
- /// RemoteNode: the new remote node
+ /// RemoteNode: the new remote node
#[pyo3(signature = (timestamp, id, properties = None, node_type = None))]
pub fn create_node(
&self,
@@ -282,11 +282,11 @@ impl PyRemoteGraph {
/// Adds properties to the remote graph.
///
/// Arguments:
- /// timestamp (int | str | datetime): The timestamp of the temporal property.
- /// properties (dict): The temporal properties of the graph.
+ /// timestamp (int | str | datetime): The timestamp of the temporal property.
+ /// properties (dict): The temporal properties of the graph.
///
/// Returns:
- /// None:
+ /// None:
pub fn add_property(
&self,
py: Python,
@@ -315,10 +315,10 @@ impl PyRemoteGraph {
/// Adds metadata to the remote graph.
///
/// Arguments:
- /// properties (dict): The metadata of the graph.
+ /// properties (dict): The metadata of the graph.
///
/// Returns:
- /// None:
+ /// None:
pub fn add_metadata(
&self,
py: Python,
@@ -346,10 +346,10 @@ impl PyRemoteGraph {
/// Updates metadata on the remote graph.
///
/// Arguments:
- /// properties (dict): The metadata of the graph.
+ /// properties (dict): The metadata of the graph.
///
/// Returns:
- /// None:
+ /// None:
pub fn update_metadata(
&self,
py: Python,
@@ -378,14 +378,14 @@ impl PyRemoteGraph {
/// Adds a new edge with the given source and destination nodes and properties to the remote graph.
///
/// Arguments:
- /// timestamp (int | str | datetime): The timestamp of the edge.
- /// src (str | int): The id of the source node.
- /// dst (str | int): The id of the destination node.
- /// properties (dict, optional): The properties of the edge, as a dict of string and properties.
- /// layer (str, optional): The layer of the edge.
+ /// timestamp (int | str | datetime): The timestamp of the edge.
+ /// src (str | int): The id of the source node.
+ /// dst (str | int): The id of the destination node.
+ /// properties (dict, optional): The properties of the edge, as a dict of string and properties.
+ /// layer (str, optional): The layer of the edge.
///
/// Returns:
- /// RemoteEdge: the remote edge
+ /// RemoteEdge: the remote edge
#[pyo3(signature = (timestamp, src, dst, properties = None, layer = None))]
pub fn add_edge(
&self,
@@ -428,13 +428,13 @@ impl PyRemoteGraph {
/// Deletes an edge in the remote graph, given the timestamp, src and dst nodes and layer (optional)
///
/// Arguments:
- /// timestamp (int): The timestamp of the edge.
- /// src (str | int): The id of the source node.
- /// dst (str | int): The id of the destination node.
- /// layer (str, optional): The layer of the edge.
+ /// timestamp (int): The timestamp of the edge.
+ /// src (str | int): The id of the source node.
+ /// dst (str | int): The id of the destination node.
+ /// layer (str, optional): The layer of the edge.
///
/// Returns:
- /// RemoteEdge: the remote edge
+ /// RemoteEdge: the remote edge
#[pyo3(signature = (timestamp, src, dst, layer=None))]
pub fn delete_edge(
&self,
diff --git a/raphtory-graphql/src/python/client/remote_node.rs b/raphtory-graphql/src/python/client/remote_node.rs
index 0d224124c7..29fddfd39b 100644
--- a/raphtory-graphql/src/python/client/remote_node.rs
+++ b/raphtory-graphql/src/python/client/remote_node.rs
@@ -27,10 +27,10 @@ impl PyRemoteNode {
/// throw an error
///
/// Parameters:
- /// new_type (str): The new type to be set
+ /// new_type (str): The new type to be set
///
/// Returns:
- /// None:
+ /// None:
pub fn set_node_type(&self, py: Python, new_type: &str) -> Result<(), GraphError> {
let template = r#"
{
@@ -57,11 +57,11 @@ impl PyRemoteNode {
/// This function allows for the addition of property updates to a node within the graph. The updates are time-stamped, meaning they are applied at the specified time.
///
/// Parameters:
- /// t (int | str | datetime): The timestamp at which the updates should be applied.
- /// properties (dict[str, PropValue], optional): A dictionary of properties to update.
+ /// t (int | str | datetime): The timestamp at which the updates should be applied.
+ /// properties (dict[str, PropValue], optional): A dictionary of properties to update.
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(signature = (t, properties=None))]
pub fn add_updates(
&self,
@@ -97,10 +97,10 @@ impl PyRemoteNode {
/// change over time. These properties are fundamental attributes of the node.
///
/// Parameters:
- /// properties (dict[str, PropValue]): A dictionary of properties to be added to the node.
+ /// properties (dict[str, PropValue]): A dictionary of properties to be added to the node.
///
/// Returns:
- /// None:
+ /// None:
pub fn add_metadata(
&self,
py: Python,
@@ -132,10 +132,10 @@ impl PyRemoteNode {
/// change over time. These properties are fundamental attributes of the node.
///
/// Parameters:
- /// properties (dict[str, PropValue]): A dictionary of properties to be added to the node.
+ /// properties (dict[str, PropValue]): A dictionary of properties to be added to the node.
///
/// Returns:
- /// None:
+ /// None:
pub fn update_metadata(
&self,
py: Python,
diff --git a/raphtory-graphql/src/python/mod.rs b/raphtory-graphql/src/python/mod.rs
index 9ad915a8d4..0292834874 100644
--- a/raphtory-graphql/src/python/mod.rs
+++ b/raphtory-graphql/src/python/mod.rs
@@ -87,7 +87,7 @@ fn translate_to_python(py: Python, value: serde_json::Value) -> PyResult String {
let schema = App::create_schema().finish().unwrap(); //will only fail if something wrong with the build
@@ -97,10 +97,10 @@ pub fn schema() -> String {
/// Encode a graph using Base64 encoding
///
/// Arguments:
-/// graph (Graph | PersistentGraph): the graph
+/// graph (Graph | PersistentGraph): the graph
///
/// Returns:
-/// str: the encoded graph
+/// str: the encoded graph
#[pyfunction]
pub(crate) fn encode_graph(graph: MaterializedGraph) -> PyResult {
let result = url_encode_graph(graph);
@@ -113,10 +113,10 @@ pub(crate) fn encode_graph(graph: MaterializedGraph) -> PyResult {
/// Decode a Base64-encoded graph
///
/// Arguments:
-/// graph (str): the encoded graph
+/// graph (str): the encoded graph
///
/// Returns:
-/// Union[Graph, PersistentGraph]: the decoded graph
+/// Union[Graph, PersistentGraph]: the decoded graph
#[pyfunction]
pub(crate) fn decode_graph(graph: &str) -> PyResult {
let result = url_decode_graph(graph);
diff --git a/raphtory-graphql/src/python/server/running_server.rs b/raphtory-graphql/src/python/server/running_server.rs
index 902ae6818d..5d568266df 100644
--- a/raphtory-graphql/src/python/server/running_server.rs
+++ b/raphtory-graphql/src/python/server/running_server.rs
@@ -85,7 +85,7 @@ impl PyRunningGraphServer {
/// Get the client for the server
///
/// Returns:
- /// RaphtoryClient: the client
+ /// RaphtoryClient: the client
pub(crate) fn get_client(&self) -> PyResult {
// TODO: return an authenticated server with rw access to everything?
self.apply_if_alive(|handler| {
@@ -98,7 +98,7 @@ impl PyRunningGraphServer {
/// Stop the server and wait for it to finish
///
/// Returns:
- /// None:
+ /// None:
pub(crate) fn stop(&mut self, py: Python) -> PyResult<()> {
self.stop_server(py)
}
diff --git a/raphtory-graphql/src/python/server/server.rs b/raphtory-graphql/src/python/server/server.rs
index f44d5f6bc2..5a7ac06bb3 100644
--- a/raphtory-graphql/src/python/server/server.rs
+++ b/raphtory-graphql/src/python/server/server.rs
@@ -22,15 +22,15 @@ use std::{path::PathBuf, sync::Arc, thread};
/// A class for defining and running a Raphtory GraphQL server
///
/// Arguments:
-/// work_dir (str | PathLike): the working directory for the server
-/// cache_capacity (int, optional): the maximum number of graphs to keep in memory at once
-/// cache_tti_seconds (int, optional): the inactive time in seconds after which a graph is evicted from the cache
-/// log_level (str, optional): the log level for the server
-/// tracing (bool, optional): whether tracing should be enabled
-/// otlp_agent_host (str, optional): OTLP agent host for tracing
-/// otlp_agent_port(str, optional): OTLP agent port for tracing
-/// otlp_tracing_service_name (str, optional): The OTLP tracing service name
-/// config_path (str | PathLike, optional): Path to the config file
+/// work_dir (str | PathLike): the working directory for the server
+/// cache_capacity (int, optional): the maximum number of graphs to keep in memory at once
+/// cache_tti_seconds (int, optional): the inactive time in seconds after which a graph is evicted from the cache
+/// log_level (str, optional): the log level for the server
+/// tracing (bool, optional): whether tracing should be enabled
+/// otlp_agent_host (str, optional): OTLP agent host for tracing
+/// otlp_agent_port(str, optional): OTLP agent port for tracing
+/// otlp_tracing_service_name (str, optional): The OTLP tracing service name
+/// config_path (str | PathLike, optional): Path to the config file
#[pyclass(name = "GraphServer", module = "raphtory.graphql")]
pub struct PyGraphServer(pub Option);
@@ -138,7 +138,7 @@ impl PyGraphServer {
/// Turn off index for all graphs
///
/// Returns:
- /// GraphServer: The server with indexing disabled
+ /// GraphServer: The server with indexing disabled
fn turn_off_index(slf: PyRefMut) -> PyResult {
let server = take_server_ownership(slf)?;
Ok(server.turn_off_index())
@@ -147,13 +147,13 @@ impl PyGraphServer {
/// Setup the server to vectorise graphs with a default template.
///
/// Arguments:
- /// cache (str): the directory to use as cache for the embeddings.
- /// embedding (Callable, optional): the embedding function to translate documents to embeddings.
- /// nodes (bool | str): if nodes have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
- /// edges (bool | str): if edges have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
+ /// cache (str): the directory to use as cache for the embeddings.
+ /// embedding (Callable, optional): the embedding function to translate documents to embeddings.
+ /// nodes (bool | str): if nodes have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
+ /// edges (bool | str): if edges have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
///
/// Returns:
- /// GraphServer: A new server object with embeddings setup.
+ /// GraphServer: A new server object with embeddings setup.
#[pyo3(
signature = (cache, embedding = None, nodes = TemplateConfig::Bool(true), edges = TemplateConfig::Bool(true))
)]
@@ -176,12 +176,12 @@ impl PyGraphServer {
/// Vectorise a subset of the graphs of the server.
///
/// Arguments:
- /// graph_names (list[str]): the names of the graphs to vectorise. All by default.
- /// nodes (bool | str): if nodes have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
- /// edges (bool | str): if edges have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
+ /// graph_names (list[str]): the names of the graphs to vectorise. All by default.
+ /// nodes (bool | str): if nodes have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
+ /// edges (bool | str): if edges have to be embedded or not or the custom template to use if a str is provided. Defaults to True.
///
/// Returns:
- /// GraphServer: A new server object containing the vectorised graphs.
+ /// GraphServer: A new server object containing the vectorised graphs.
#[pyo3(
signature = (graph_names, nodes = TemplateConfig::Bool(true), edges = TemplateConfig::Bool(true))
)]
@@ -202,12 +202,12 @@ impl PyGraphServer {
/// Start the server and return a handle to it.
///
/// Arguments:
- /// port (int): the port to use. Defaults to 1736.
- /// timeout_ms (int): wait for server to be online. Defaults to 5000.
- /// The server is stopped if not online within timeout_ms but manages to come online as soon as timeout_ms finishes!
+ /// port (int): the port to use. Defaults to 1736.
+ /// timeout_ms (int): wait for server to be online. Defaults to 5000.
+ /// The server is stopped if not online within timeout_ms but manages to come online as soon as timeout_ms finishes!
///
/// Returns:
- /// RunningGraphServer: The running server
+ /// RunningGraphServer: The running server
#[pyo3(
signature = (port = 1736, timeout_ms = 5000)
)]
@@ -264,11 +264,11 @@ impl PyGraphServer {
/// Run the server until completion.
///
/// Arguments:
- /// port (int): The port to use. Defaults to 1736.
- /// timeout_ms (int): Timeout for waiting for the server to start. Defaults to 180000.
+ /// port (int): The port to use. Defaults to 1736.
+ /// timeout_ms (int): Timeout for waiting for the server to start. Defaults to 180000.
///
/// Returns:
- /// None:
+ /// None:
#[pyo3(
signature = (port = 1736, timeout_ms = 180000)
)]
diff --git a/raphtory-graphql/src/server.rs b/raphtory-graphql/src/server.rs
index e77b549aea..fd2ae3f7b7 100644
--- a/raphtory-graphql/src/server.rs
+++ b/raphtory-graphql/src/server.rs
@@ -148,7 +148,7 @@ impl GraphServer {
/// * template - the template to use for creating documents.
///
/// Returns:
- /// A new server object containing the vectorised graphs.
+ /// A new server object containing the vectorised graphs.
pub fn with_vectorised_graphs(
mut self,
graph_names: Vec,