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

Add a function that parses a map of nodes and rel into a graph object #441

Open
matea16 opened this issue Jan 25, 2024 · 0 comments
Open
Labels
community community Effort - Medium Effort - Medium Frequency - Monthly Frequency - Monthly Priority - Later Priority - Later Reach - VeryFew Reach - VeryFew Severity - S3 Severity - S3

Comments

@matea16
Copy link

matea16 commented Jan 25, 2024

Currently, in order to pass an object as a subgraph argument to a procedure, it has to be a Graph type object which is only provided by the output of the project() function.

For the usability purposes, it would be useful to have a function that takes map of nodes and edges as an argument and parses them into a Graph type of object. For example, the following query works as expected:

MATCH p=(:Node)-[:RELATION]-(:Node)
WITH project(p) AS subgraph
CALL bridges.get(subgraph)
YIELD node_from, node_to
RETURN node_from, node_to;

but, the you can not pass the subgraph as an argument using this query:

CALL {
  MATCH (n:Node)
  RETURN n
  LIMIT 1
}
CALL path.subgraph_all(n, {}) YIELD nodes, rels
WITH {nodes: nodes, edges: rels} AS subgraph
CALL bridges.get(subgraph)
YIELD node_from, node_to
RETURN node_from, node_to;

Source from the community

@matea16 matea16 added Importance - I3 Importance - I3 Severity - S3 Severity - S3 Effort - Unknown Effort - Unknown community community labels Jan 25, 2024
@imilinovic imilinovic added Effort - Medium Effort - Medium and removed Effort - Unknown Effort - Unknown labels Feb 22, 2024
@hal-eisen-MG hal-eisen-MG added Priority - Later Priority - Later Priority - Now Priority - Now and removed Priority - Later Priority - Later Priority - Now Priority - Now labels Feb 22, 2024
@katarinasupe katarinasupe added Frequency - Monthly Frequency - Monthly Reach - VeryFew Reach - VeryFew and removed Importance - I3 Importance - I3 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community Effort - Medium Effort - Medium Frequency - Monthly Frequency - Monthly Priority - Later Priority - Later Reach - VeryFew Reach - VeryFew Severity - S3 Severity - S3
Projects
Development

No branches or pull requests

4 participants