2

This is my Cypher query and its equivalent result in neo4j Browser

MATCH (a)-[b:REFERENCE]->(c) RETURN a,b,c LIMIT 200

enter image description here

The b column (or key in JSON) contains the relationship and all the data that is associated with it. This is my ideal response.

However running the same query in my Python API using the neo4j driver(==5.7.0) gives me the following result

enter image description here

The 'b' column now gives me redundant and incomplete information

Following is a snippet of the API code

with self.driver.session() as session:
    return [record.data() for record in session.run(query)]

What I tried:

  1. Using different methods for Record object as seen here
  2. Using different methods for Response object as seen here
  3. Changing query to

    MATCH p = ()-[:REFERENCE]->() RETURN p LIMIT 200

None of this yielded different results

kenneth-rebello
  • 914
  • 1
  • 7
  • 13

1 Answers1

0

The relationship type is different between your 2 results (REFERENCE vs AUTHORED). But it probably does not matter with respect to my answer.

In the Browser response, the b data is just telling you that the relationship contains no properties, starts at a, and ends at c.

Your Python response is essentially saying the same thing. So you are not missing any information.

cybersam
  • 63,203
  • 6
  • 53
  • 76