Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic inflation of Path nodes returned by cypher query #715

Closed
73VW opened this issue Jul 10, 2023 · 2 comments
Closed

Automatic inflation of Path nodes returned by cypher query #715

73VW opened this issue Jul 10, 2023 · 2 comments
Labels

Comments

@73VW
Copy link

73VW commented Jul 10, 2023

Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests.
Before sending unsolicited pull requests, please open a feature request to discuss your proposal.

If you have questions on usage, please ask on the Discussion Forum instead of creating an issue here.

Feature description (Mandatory)

Hello everyone,

It seems that nodes contained in a path are not inflated when using resolve_objects=True in db.cypher_query.

Checking in the code seems to confirm that. This method seems to inflate Node, Relationship or iterate over a list but doesn't do anything regarding Path objects returned by a cypher query.

My concern is that I make a query to find all nodes at a depth X from a certain center node.

        ....
        query = f"""
    MATCH (p) WHERE id(p) = {center}
    MATCH path = (p)-[r:links*1..{depth}]-(connected)
    RETURN path
"""
        results, meta = db.cypher_query(query, resolve_objects=True)
        ...

This returns a list of Path objects.

Considered alternatives

Iteratively inflate all nodes of a path.

How this feature can improve the project?

This will resolve nodes of a path under the hood.

@aanastasiou
Copy link
Collaborator

Indeed. These features have been developed and merged at different time scales, hence these discrepancies. Thanks for flagging this up.

@mariusconjeaud
Copy link
Collaborator

Part of release 5.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants