From ddd224c8d113e9ff905e41a746c4094e914cfeba Mon Sep 17 00:00:00 2001 From: Matchu Date: Fri, 16 Apr 2021 18:41:26 -0700 Subject: [PATCH] Handle null outfit creator, oops! --- src/server/types/Outfit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/types/Outfit.js b/src/server/types/Outfit.js index b2350f9..ba2b00f 100644 --- a/src/server/types/Outfit.js +++ b/src/server/types/Outfit.js @@ -70,7 +70,7 @@ const resolvers = { }, creator: async ({ id }, _, { outfitLoader }) => { const outfit = await outfitLoader.load(id); - return { id: outfit.userId }; + return outfit.userId ? { id: outfit.userId } : null; }, }, Query: {