diff --git a/graph/context.js b/graph/context.js index cdc05f6cf..ce8f5eb83 100644 --- a/graph/context.js +++ b/graph/context.js @@ -8,7 +8,9 @@ class Context { constructor({user = null}) { // Load the current logged in user to `user`, otherwise this'll be null. - this.user = user; + if (user) { + this.user = user; + } // Create the loaders. this.loaders = loaders(this);