JSON object used to define a single operation token in a sequence of traversal operations, which determines the pattern the chain function uses to traverse the graph.

There are two types of operations, one matching nodes and one matching edges. To make an operation object of node type, the property "type" needs to be set to "Node". Likewise, to make an operation object of edge type, the property "type" needs to be set to "Edge". Each operation will be documented seperately below.

Node Parameters

Parameter Type Default Description
type string - String determining the graph element type the operation applies to. To set this operation to node, the type must be set to "Node".
filter_dict {[element_key: string]: any} {} Object used to filter out elements in this token to only those which have all specified key-value pairs. This acts as an equality filter. One element key, "type", is reserved. If used, the associated value takes a GFQL predicate object which changes the behaviour from value equality filtering to the specified predicate statement.
name string - String which adds a boolean-valued column to the output graph named using the value provided. All graph elements matched by this token will have its corresponding value in the new column set to true. Otherwise if a graph element is not matched by this token, its corresponding value in the new column will be set to false.
query string - String defining a dataframe query used to match nodes for this token.
 
Example: A token matching nodes with "id" of "a" and "value" of 5
{
    "type": "Node",
    "filter_dict": {
        "id": "a",
        "value": 5
    }
}
 

Edge Parameters

Parameter Type Default Description
type string - String determining the graph element type the operation applies to. To set this operation to edge, the type must be set to "Edge".
name string - String which adds a boolean-valued column to the output graph named using the value provided. All graph elements matched by this token will have its corresponding value in the new column set to true. Otherwise if a graph element is not matched by this token, its corresponding value in the new column will be set to false.
hops number - Integer defining the number of sequential edge hops which this token must match.
to_fixed_point bool - Boolean value that overrides the hops property, allowing the token to match as many sequential edge hops as possible, enabling greedy token matching.
direction string - String specifying the directionality of the edge which the token will match. Valid strings include "forward", "reverse", and "undirected".
source_node_match {[element_key: string]: any} {} Object used to match only edges with source nodes containing all specified property key-value pairs in this token. This acts as an equality filter. One element key, "type", is reserved. If used, the associated value takes a GFQL predicate object which changes the behaviour from value equality filtering to the specified predicate statement.
edge_match {[element_key: string]: any} {} Object used to match only edges with all specified property key-value pairs in this token. This acts as an equality filter. One element key, "type", is reserved. If used, the associated value takes a GFQL predicate object which changes the behaviour from value equality filtering to the specified predicate statement.
destination_node_match {[element_key: string]: any} {} Object used to match only edges with destination nodes containing all specified property key-value pairs in this token. This acts as an equality filter. One element key, "type", is reserved. If used, the associated value takes a GFQL predicate object which changes the behaviour from value equality filtering to the specified predicate statement.
source_node_query string - String defining a dataframe query used to match nodes, of which all edges matched by this token must have one of as its source node.
destination_node_query string - String defining a dataframe query used to match nodes, of which all edges matched by this token must have one of as its destination node.
edge_query string - String defining a dataframe query used to match edges for this token.
 
Example: A token matching only 2 consecutive forward edges
{
    "type": "Edge",
    "hops": 2,
    "direction": "forward"
}