Neo.ClientError.Statement.SyntaxError

// Find maximum diameter of network

// maximum shortest path between two nodes

MATCH (a:Character), (b:Character) WHERE id(a) > id(b)

MATCH p=shortestPath((a)-[:INTERACTS*]-(b))

RETURN length(p) AS Length, extract(x IN nodes(p) | x.name) AS Path

ORDER BY len DESC LIMIT 4

Neo.ClientError.Statement.SyntaxError

Extract is no longer supported. Please use list comprehension instead (line 5, column 29 (offset: 206))
"RETURN length(p) AS Length, extract(x IN nodes(p) | x.name) AS Path"

Try this:

match(a:Character)
match(b:Character)
where id(a) > id(b)
match p=shortestPath((a)-[:INTERACTS*]-(b))
return length(p) as Length, [x in nodes(p) | x.name] as Path
order by Length desc
limit 4

thank you very much,
can run