Serve pet name as id too in GQL
This commit is contained in:
parent
92a4fd4808
commit
9ea8245208
1 changed files with 1 additions and 0 deletions
|
@ -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),
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue