I've a query that fetches nodes based on a property
MATCH (c { type: 'sometype' })
WITH c LIMIT 100
RETURN c
all I want is to also fetch all the relations between nodes in the resultset, on IRC someone told me to use:
MATCH (c { type: 'sometype'])
WITH c LIMIT 100
OPTIONAL MATCH (c)-[r]-()
RETURN c, r
but that will include relationships from node c to nodes outside the resultset which in my case (some hundred thousand relationships) could create very big useless resultset or performance issues)
Is there any way to achieve that?