I'm using the Neo4jphp REST API and I'm having a problem of relating a node iv created in my code to a node im retrieving from the neo4j database. I'm retrieving the node as follows
$querystring="MATCH(n)"."WHERE has (n.name) and n.name='Interests'"."RETURN n";
$query=new Everyman\Neo4j\Cypher\Query($client,$querystring);
$result=$query->getResultSet();
im creating another node in my code using createNode()
$friend=$client->makeNode()->setProperty('name',$fname)->save();
I used relateTo() to relate them
$m=$client->getNode($result);
$m->relateTo($friend,$movi)->save();//$movi is a common movie name
but getting this error
PHP Catchable fatal error: Object of class Everyman\\Neo4j\\Query\\ResultSet could not be converted to string in /var/www/vendor/everyman/neo4jphp/lib/Everyman/Neo4j/Cache/EntityCache.php
would really appreciate any input