I'm trying to create procedure for a cypher script with apoc.custom.declareProcedure (same for the asProcedure pendant) and always receive the exception: Failed to invoke procedure `apoc.custom.declareProcedure`: Caused by: java.lang.RuntimeException: Query results do not match requested output.
Here's my procedure: procedure.txt
And a corresponding cypher script cypher.txt, which works like a charm
I've also tried to change the output type to NODE? or ANY but nothing worked.
Can anybody have a look at it and help me out?
Ok, perhaps I got it.
The bug happens because your query use the variable log twice,
so the "EXPLAIN query" return log with an id to distinguish it from the other.
As a temporary workaround, you could modify your query changing the final part
from match (node)-[:has]->(log:System:Log) where (node)-[:current]->(log) return log
to match (node)-[:has]->(logAnother:System:Log) where (node)-[:current]->(logAnother) return logAnother
and the return output from (log::NODE) to (logAnother::NODE)