cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Got UnsupportedOperationException message when I trying to pass some parameters to a cypher

lzl121373
Node

What I want to do was to insert a cypher into my java program and pass some parameters to this cypher,
This is my cypher :

    @Query("CALL gds.beta.graph.create.subgraph($releaseName + 'CoChangeGraph', 'myCoChangeGraph', 'n.projectId = $projectId', '*')")
    void createMySubCoChangeGraph(@Param("projectId") Long projectId, @Param("releaseName") String releaseName);

I got this message when I call this method :

Error executing query : Failed to invoke procedure `gds.beta.graph.create.subgraph`: Caused by: java.lang.UnsupportedOperationException. Rolling back transaction.

And I also found that I can use method successfully when I don't pass some parameters to this method like this :

    @Query("CALL gds.beta.graph.create.subgraph('CoChangeGraph', 'myCoChangeGraph', 'n.projectId = 122', '*')")
    void createMySubCoChangeGraph();

But I really need to pass some parameters to this cypher.Is there any wrong in my operation or is this only a bug I don't know?

1 REPLY 1

Can you try to run the procedure call in neo4j browser with parameters?

I doubt that the subgraph projection expression supports parameter yet. But you can create a GH issue at

as a feature request