Initial subscription impl

This commit is contained in:
Wyatt Johnson
2017-03-23 11:09:14 -06:00
parent 7e65ba6371
commit 63ef49d595
17 changed files with 533 additions and 235 deletions
+4 -1
View File
@@ -31,7 +31,7 @@ const decorateContextPlugins = (context, contextPlugins) => contextPlugins.reduc
* Stores the request context.
*/
class Context {
constructor({user = null}) {
constructor({user = null}, pubsub) {
// Load the current logged in user to `user`, otherwise this'll be null.
if (user) {
@@ -46,6 +46,9 @@ class Context {
// Decorate the plugin context.
this.plugins = decorateContextPlugins(this, contextPlugins);
// Bind the publish/subscribe to the context.
this.pubsub = pubsub;
}
}