Handle null outfit creator, oops!

This commit is contained in:
Emi Matchu 2021-04-16 18:41:26 -07:00
parent fd931c064e
commit ddd224c8d1

View file

@ -70,7 +70,7 @@ const resolvers = {
}, },
creator: async ({ id }, _, { outfitLoader }) => { creator: async ({ id }, _, { outfitLoader }) => {
const outfit = await outfitLoader.load(id); const outfit = await outfitLoader.load(id);
return { id: outfit.userId }; return outfit.userId ? { id: outfit.userId } : null;
}, },
}, },
Query: { Query: {