Introduction
RedisGraph supports a variety of data kinds, some of which can be saved as property values and others that are only temporary.
Graph types
Graph types are either structural pieces or projections of the graph. There is no way to save none as a property value.
Nodes
Nodes are persistent graph elements linked to one another through relationships.
They can represent through as many labels as they choose to describe their overall type. For instance, a node representing London may be constructed using the Place and City labels and retrieved using either or both in queries.
Nodes have properties that describe all of their important features. Our London node, for example, would have the following property set: name: 'London,' capital: True, elevation: 11.
Multiple labels can be supplied while querying nodes. Only nodes with all of the labels supplied will be matched:
$ redis-cli GRAPH.QUERY G "MATCH (n:Place:Continent) RETURN n"
Relationships
Relationships are graph elements that connect nodes in a lasting way.
They must all be of the same kind to represent the same thing. A RESIDENT OF connection, for example, can be used to link a Person node to a City node.
Connections between source and destination nodes are always directed.
Relationships, like nodes, have a set of properties that specify all of their important aspects.
Multiple types can be supplied when querying relationships when separated by kinds. Relationships that contain any of the kinds provided will be matched:
$ redis-cli GRAPH.QUERY G "MATCH (:Person)-[r:RESIDENT_OF|:VISITOR_TO]->(:Place {name: 'London'}) RETURN r"
Paths
Paths are alternating node and edge sequences that begin and conclude with a node.
They are not structural aspects of the graph, but queries can construct and return them.
The following query, for example, retrieves all pathways of any length linking the nodes London and New York:
$ redis-cli GRAPH.QUERY G "MATCH p=(:City {name: 'London'})-[*]->(:City {name: 'New York'}) RETURN p"




