To provide more information: The controller has t...
# orm-help
c
To provide more information: The controller has these 2 functions which calls, the above functions in the service
Copy code
@Get(`${Route}/:id`)
  byId(@Param('id', ParseIntPipe) PKPersonID: number) {
    return this.personService.person({
      PKPersonID,
    });
  }

  @Get(`${Route}/contacts/:id`)
  contacts(@Param('id', ParseIntPipe) PKPersonID: number) {
    return this.personService.personWContacts({
      PKPersonID,
    });
  }
Found the issue: Looking at the wrong functions.
Copy code
CONTROLLER: 

@Get(`${Route}/contacts/:id`)
  contacts(@Param('id', ParseIntPipe) PKPersonID: number) {
    return this.personService.personWContacts({
      PKPersonID,
    })
  }

SERVICE: 

personWContacts(personWhereUniqueInput: Prisma.PersonWhereUniqueInput) {
    const personContacts = this.prisma.person.findUnique({
      where: personWhereUniqueInput,
      include: contactsIncludeQuery,
      rejectOnNotFound: true,
    })
    return personContacts;
  }
👍 1