# Relationship labels

**URL:** <https://community.neo4j.com/t/relationship-labels/41684>\
**Category:** Graph Academy\
**Tags:** cypher\
**Created:** [July 20, 2021, 9:38am UTC](https://community.neo4j.com/t/relationship-labels/41684 "2021-07-20T09:38:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chribonn](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/chribonn/32/19266_2.png) [@chribonn](https://community.neo4j.com/u/chribonn)\
**Post date:** [July 20, 2021, 9:38am UTC](https://community.neo4j.com/t/relationship-labels/41684/1 "2021-07-20T09:38:10Z")

</div>

Hello,

I am on page [Using WHERE to Filter Queries - Querying with Cypher in Neo4j 4.x](https://neo4j.com/graphacademy/training-querying-40/02-querying40-using-where-to-filter-queries/). The query I'm executing is

> MATCH (p:Person)-[r:ACTED\_IN]-\>(m:Movie)  
> WHERE 'Neo' IN r.roles AND m.title='The Matrix'  
> RETURN p.name

What I don't understand is where is the roles label in ACTED\_IN. I tried looking for it by doing a Call db.schema.visualization() and this is what I get:

> {  
> "identity": -31,  
> "start": -11,  
> "end": -12,  
> "type": "ACTED\_IN",  
> "properties": {
> 
> }  
> }

How can I visualise what I can filter on?

Thanks

---

<div class="post-metadata">

**Author:** ![vialard](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/vialard/32/18749_2.png) [@vialard](https://community.neo4j.com/u/vialard)\
**Post date:** [July 20, 2021, 11:43am UTC](https://community.neo4j.com/t/relationship-labels/41684/2 "2021-07-20T11:43:13Z")

</div>

AFAIK db.schema.visualization() only displays available indexes. You could use the APOC schema functions: [apoc.meta.relTypeProperties - APOC Extended Documentation](https://neo4j.com/labs/apoc/4.3/overview/apoc.meta/apoc.meta.relTypeProperties/)

Be aware that APOC only sample the data, so if you need to be 100% sure, you will have to retrieve the properties for the labels and relation type you are interested in like that:

```auto
MATCH (p:Person)-[r:ACTED_IN]->(m:Movie)
RETURN DISTINCT keys(r) AS properties

```

---

<div class="post-metadata">

**Author:** ![elaine\_rosenber](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/elaine_rosenber/32/27409_2.png) [@elaine\_rosenber](https://community.neo4j.com/u/elaine_rosenber)\
**Post date:** [July 20, 2021, 12:49pm UTC](https://community.neo4j.com/t/relationship-labels/41684/3 "2021-07-20T12:49:48Z")

</div>

Hello @chribonn and welcome to the Community!

In Neo4j Browser, if you hover over the relationships, the roles property should be viewable at the bottom.

You might want to perform this query to see all of the roles for these relationships;

MATCH (p:Person)-[r:ACTED\_IN]-\>(m:Movie)  
RETURN p.name, r.roles, m.title

Properties are not required for a relationship so there are probably ACTED\_IN relationships with no roles property defined,

Elaine

---

<div class="post-metadata">

**Author:** ![digitarun27](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/digitarun27/32/30683_2.png) [@digitarun27](https://community.neo4j.com/u/digitarun27)\
**Post date:** [February 8, 2024, 4:51am UTC](https://community.neo4j.com/t/relationship-labels/41684/4 "2024-02-08T04:51:06Z")

</div>

I find myself nodding along as I read, appreciating the depth of your insights. This blog is a valuable resource, and I look forward to future posts. [Jira Tutorial](https://www.igmguru.com/blog/jira-tutorial/)
