Skip to content

Instantly share code, notes, and snippets.

@Mattchewone Mattchewone/service.js Secret
Created Feb 22, 2019

What would you like to do?
Example service file for publish
service.publish((data, context) => {
// Only publish if we are from an internal emit
// Only publish the new record to the user within the context
if (context.hookEmit) {
.filter(connection => connection.user && connection.user._id.toString() === context.userId.toString())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.