apoc.schema.relationships

Procedure

apoc.schema.relationships(config Map<String, Any>) - returns the indexes and constraints information for all the relationship types in the database. It is possible to define a set of relationship types to include or exclude in the config parameters.

Signature

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

Input parameters

Name Type Default

config

MAP?

{}

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
FOR ()-[like:LIKED]-()
REQUIRE (like.day) IS NOT NULL;
CALL apoc.schema.relationships();
Table 1. Results
name type properties status

"CONSTRAINT ON ()-[liked:LIKED]-() ASSERT liked.day IS NOT NULL"

"RELATIONSHIP_PROPERTY_EXISTENCE"

["day"]

""