Serve pet name as id too in GQL

This commit is contained in:
Emi Matchu 2021-05-12 22:52:58 -07:00
parent 92a4fd4808
commit 9ea8245208

View file

@ -24,6 +24,7 @@ const typeDefs = gql`
const resolvers = { const resolvers = {
Pet: { Pet: {
id: ({ name }) => name,
species: ({ customPetData }) => ({ species: ({ customPetData }) => ({
id: String(customPetData.custom_pet.species_id), id: String(customPetData.custom_pet.species_id),
}), }),