apoc.meta.graph.of

Procedure APOC Core

apoc.meta.graph.of({graph}, {config}) - examines a subset of the graph to provide a graph meta information

Signature

apoc.meta.graph.of(graph = {} :: ANY?, config = {} :: MAP?) :: (nodes :: LIST? OF NODE?, relationships :: LIST? OF RELATIONSHIP?)

Input parameters

Name Type Default

graph

ANY?

{}

config

MAP?

{}

Output parameters

Name Type

nodes

LIST? OF NODE?

relationships

LIST? OF RELATIONSHIP?

Usage Examples

Type of supported input graphs

Type Description

String

a Cypher query

Virtual Graph

a Virtual Graph returned by apoc.graph.*

Map

a map with two field nodes (a list of nodes, mandatory), relationships (a list of relationships)

If you have a quite complex Graph, and you want to analyze and get some info about a specific sub-graph in it, you can leverage the apoc.meta.graph.of procedure.

So for the given Graph Model:

apoc.meta.graph.example

You can leverage the apoc.meta.graph.of procedure in this way:

apoc.meta.graph.of

That will extract the Meta Graph of the provided query, with some stats like the count for each node involved into the query.

If you want more details you can also look at apoc.meta.graph documentation