siyfion
07/24/2018, 2:02 PMlawjolla
07/24/2018, 8:06 PMsiyfion
07/25/2018, 10:50 AMUser
type has a firstName
and a lastName
field. Yet the API wants to expose fullName
and concatenate the two. If the query coming in is simply: query { user(id: "X") { id fullName } }
then the resolver for fullName
will fail, as it doesn’t have access to firstName
and lastName
. Now… You could re-query the user
in the resolver, but a 2nd DB query seems overkill. Is there no way to say “if the user queries for fullName
ensure that firstName
and lastName
are returned from Prisma, regardless of whether they were in the original query?”lawjolla
07/25/2018, 4:29 PM