Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 1: replicate users.

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


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?


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