veliovgroup / ostrio-Neo4jreactivity

Meteor.js Neo4j database reactivity layer
https://atmospherejs.com/ostrio/neo4jreactivity
BSD 3-Clause "New" or "Revised" License
51 stars 5 forks source link

publish/subscribe multiple nodes #60

Closed schabluk closed 9 years ago

schabluk commented 9 years ago

From usage examples:

friends = Meteor.neo4j.collection 'friends'
friends.publish 'allFriends', () ->
  return "MATCH (user {_id: {userId}})-[:FriendOf]->(friends) RETURN friends"
friends.subscribe 'allFriends', {userId: Meteor.userId()}, 'friends'

The link parameter in subscribe method is a single node. How can I get multiple nodes from subscription, when my publish funtion returns more than one node?

friends.publish 'allFriends', () ->
  return "MATCH (user {_id: {userId}})-[:FriendOf]->(friends) RETURN user, friends"
dr-dimitru commented 9 years ago

Hi @schabluk Currently only creating multiple subscriptions for each object.

But major driver release is coming soon (1-2 days), there is this issue will be solved.

schabluk commented 9 years ago

Great, thank you!