From 9ea824520824ca3598f59c2b05bb23c4a052a3a9 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 12 May 2021 22:52:58 -0700 Subject: [PATCH] Serve pet name as id too in GQL --- src/server/types/Pet.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/types/Pet.js b/src/server/types/Pet.js index 6117401..e588ee3 100644 --- a/src/server/types/Pet.js +++ b/src/server/types/Pet.js @@ -24,6 +24,7 @@ const typeDefs = gql` const resolvers = { Pet: { + id: ({ name }) => name, species: ({ customPetData }) => ({ id: String(customPetData.custom_pet.species_id), }),