Nested object call returning null


Query returns null result for relation type, But I’ve connected object on that field. How to solve it?

My datamodel looks like this.

type User {
id: ID! @unique
name: String!


type Topic {
id: ID! @unique
title: String!
followers: [User!]!

When I query Topic from apollo server using prisma client , followers field returns null instead of User object. How to solve this?


Hi @cellographic

You will need to implement a type resolver for relations, see:


Thanks a lot. It’s working.


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.