From 07426ddb47b8744d33bb8a834ffac73c12c93290 Mon Sep 17 00:00:00 2001
From: Guillaume WANG <guillaume.wang@polytechnique.edu>
Date: Wed, 19 Jun 2019 22:31:46 -0400
Subject: [PATCH] remove one useless operation

---
 src/app.ts        | 2 +-
 webpack.config.js | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/app.ts b/src/app.ts
index 8fa6b7a..36dfd54 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -163,7 +163,7 @@ const context = async ({ req }): Promise<Context> => {
     | Authenticated: ${req.isAuthenticated()}
     `.trim());
     
-    if(req.isAuthenticated() && req.user) {
+    if(req.isAuthenticated()) {
         console.log("graphql API is receiving a request from an authenticated user! \\o/");
         try {
             uid = req.user.uid;
diff --git a/webpack.config.js b/webpack.config.js
index 8a2f661..9718366 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -70,10 +70,7 @@ const config = {
             use: [{
                 loader: 'webpack-graphql-loader',
                 options: {
-                    // validate: true,
-                    // schema: "./path/to/schema.json",
-                    // removeUnusedFragments: true
-                    // etc. See "Loader Options" below
+                    minify: true
                 }
             }]
         }, {
-- 
GitLab