The first way of creating a projected graph is to list the node labels, relationship types, and properties you want to include. For this, we will use the gds.graph.create procedure to create a named projected graph. Its signature is as follows:
CALL gds.graph.create(
graphName::STRING,
nodeProjection::STRING, LIST or MAP,
relationshipProjection::STRING, LIST or MAP,
configuration::MAP
)
The simplest way of using this procedure is to include all nodes and relationships like this:
CALL gds.graph.create("projGraphAll", "*", "*")
The projGarphAll graph is now available and we will be able to tell the graph algorithms to run on this graph.
If you need more customization, here is the full signature of a node projection:
{
<node-label>: {
label: <neo4j-label>,
properties: {
<property-key-1>: {
property: <neo-property-key>,
defaultValue: <numeric-value...