Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-09-2020 12:16 AM
I have a custom function defined like:
CALL apoc.custom.asFunction('fn', "MATCH ...
RETURN stuff", 'NODE', [['param1', 'STRING']], false, 'docstring')
It's supposed to return a matched node by some criteria. When I run CALL custom.fn("something")
The returned result I'm seeing is
{
"stuff": {
"identity": 1,
"labels": [
"Target"
],
"properties": {
"value": 2
}
}
}
but I can't seem to get rid of that extra level of nesting "stuff" and just get
{
"identity": 1,
"labels": [
"Target"
],
"properties": {
"value": 2
}
}
How could I get rid of it? It's really a nuisance when trying to use custom function e.g.
WITH custom.fn("something") as x
MATCH (x)-[r]->(y)
RETURN x, r, y
I get the error
Expected to find a node at 'x' but found Map{stuff -> (1)} instead
and I have to do tricky thing to lookup by x.stuff
instead. I just want return value directly to be the node.
11-10-2020 07:27 AM
I believe this is a bug. There's even more weirdness surrounding this issue. Reported here: https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/1714 with steps / full statements to reproduce
All the sessions of the conference are now available online