@Test public void testFromPath() throws Exception { TestUtil.testCall(db,"MATCH path = (n)-[r]->(m) CALL apoc.graph.fromPath(path,'test',{answer:42}) YIELD graph RETURN *", r -> assertEquals(graph, r.get("graph"))); }
@Description("apoc.graph.fromPaths(path,'name',{properties}) - creates a virtual graph object for later processing") @Procedure public Stream<VirtualGraph> fromPath(@Name("path") Path paths, @Name("name") String name, @Name("properties") Map<String,Object> properties) { return Stream.of(new VirtualGraph(name, paths.nodes(), paths.relationships(),properties)); }
Graphs { @Description("apoc.graph.fromPaths(path,'name',{properties}) - creates a virtual graph object for later processing") @Procedure public Stream<VirtualGraph> fromPath(@Name("path") Path paths, @Name("name") String name, @Name("properties") Map<String,Object> properties) { return Stream.of(new VirtualGraph(name, paths.nodes(), paths.relationships(),properties)); } }
Graphs { @Description("apoc.graph.fromPaths(path,'name',{properties}) - creates a virtual graph object for later processing") @Procedure public Stream<VirtualGraph> fromPath(@Name("path") Path paths, @Name("name") String name, @Name("properties") Map<String,Object> properties) { return Stream.of(new VirtualGraph(name, paths.nodes(), paths.relationships(),properties)); }  }
Graphs { @Description("apoc.graph.fromPaths(path,'name',{properties}) - creates a virtual graph object for later processing") @Procedure public Stream<VirtualGraph> fromPath(@Name("path") Path paths, @Name("name") String name, @Name("properties") Map<String,Object> properties) { return Stream.of(new VirtualGraph(name, paths.nodes(), paths.relationships(),properties)); }  @Description("apoc.graph.fromData([nodes],[relationships],'name',{properties}) | creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromData(@Name("nodes") List<Node> nodes, @Name("relationships") List<Relationship> relationships, @Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.from(data,'name',{properties}) | creates a virtual graph object for later processing it tries its best to extract the graph information from the data you pass in") @Procedure Stream<VirtualGraph> from(@Name("data") Object data, @Name("name") String name, @Name("properties") Map<String,Object> properties); static boolean extract(Object data, Set<Node> nodes, Set<Relationship> rels); @Description("apoc.graph.fromPaths(path,'name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromPath(@Name("path") Path paths, @Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromPaths([paths],'name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromPaths(@Name("paths") List<Path> paths, @Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromDB('name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromDB(@Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromCypher('kernelTransaction',{params},'name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromCypher(@Name("kernelTransaction") String statement,  @Name("params") Map<String,Object> params,@Name("name") String name,  @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromDocument({json}, {config}) yield graph - transform JSON documents into graph structures") @Procedure(mode = Mode.WRITE) Stream<VirtualGraph> fromDocument(@Name("json") Object document, @Name(value = "config", defaultValue = "{}") Map<String,Object> config); @Description("apoc.graph.validateDocument({json}, {config}) yield row - validates the json, return the result of the validation") @Procedure(mode = Mode.READ) Stream<RowResult> validateDocument(@Name("json") Object document, @Name(value = "config", defaultValue = "{}") Map<String,Object> config); }
Graphs { @Description("apoc.graph.fromPaths(path,'name',{properties}) - creates a virtual graph object for later processing") @Procedure public Stream<VirtualGraph> fromPath(@Name("path") Path paths, @Name("name") String name, @Name("properties") Map<String,Object> properties) { return Stream.of(new VirtualGraph(name, paths.nodes(), paths.relationships(),properties)); }  @Description("apoc.graph.fromData([nodes],[relationships],'name',{properties}) | creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromData(@Name("nodes") List<Node> nodes, @Name("relationships") List<Relationship> relationships, @Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.from(data,'name',{properties}) | creates a virtual graph object for later processing it tries its best to extract the graph information from the data you pass in") @Procedure Stream<VirtualGraph> from(@Name("data") Object data, @Name("name") String name, @Name("properties") Map<String,Object> properties); static boolean extract(Object data, Set<Node> nodes, Set<Relationship> rels); @Description("apoc.graph.fromPaths(path,'name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromPath(@Name("path") Path paths, @Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromPaths([paths],'name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromPaths(@Name("paths") List<Path> paths, @Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromDB('name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromDB(@Name("name") String name, @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromCypher('kernelTransaction',{params},'name',{properties}) - creates a virtual graph object for later processing") @Procedure Stream<VirtualGraph> fromCypher(@Name("kernelTransaction") String statement,  @Name("params") Map<String,Object> params,@Name("name") String name,  @Name("properties") Map<String,Object> properties); @Description("apoc.graph.fromDocument({json}, {config}) yield graph - transform JSON documents into graph structures") @Procedure(mode = Mode.WRITE) Stream<VirtualGraph> fromDocument(@Name("json") Object document, @Name(value = "config", defaultValue = "{}") Map<String,Object> config); @Description("apoc.graph.validateDocument({json}, {config}) yield row - validates the json, return the result of the validation") @Procedure(mode = Mode.READ) Stream<RowResult> validateDocument(@Name("json") Object document, @Name(value = "config", defaultValue = "{}") Map<String,Object> config); @Context
    public Transaction tx; }