apoc.schema.relationships

Procedure APOC Core

CALL apoc.schema.relationships([config]) yield name, startLabel, type, endLabel, properties, status

Signature

apoc.schema.relationships(config = {} :: MAP?) :: (name :: STRING?, type :: STRING?, properties :: LIST? OF STRING?, status :: STRING?)

Input parameters

Name Type Default

config

MAP?

{}

Config parameters

Table 1. Config parameters
name type default description

relationships

List<String>

[]

Relationship types to include. Default is to include all relationship types.

excludeRelationships

List<String>

[]

Relationship types to exclude. Default is to include all relationship types.

It’s not possible to valuate both relationships and excludeRelationships. In this case, the error Parameters relationships and excludeRelationships are both valued. will be returned.

Output parameters

Name Type

name

STRING?

type

STRING?

properties

LIST? OF STRING?

status

STRING?

Usage Examples

The examples in this section are based on a database that has applied the following constraints:

CREATE CONSTRAINT likesDay
ON ()-[like:LIKED]-()
ASSERT EXISTS (like.day);
CALL apoc.schema.relationships();
Table 2. Results
name type properties status

"CONSTRAINT ON ()-[liked:LIKED]-() ASSERT exists(liked.day)"

"RELATIONSHIP_PROPERTY_EXISTENCE"

["day"]

""