hey guys. trying to return a number representing `...
# orm-help
m
hey guys. trying to return a number representing
count
from my resolver when printing in console it’s all good when quering it in graphql playfround i get
null
anyone know what might be the problem?
i’m using prisma2
r
for prisma 1 I’d day to check what your return type says where you declare your query?
Copy code
type Query {
   unreadMessages: Number
}
Else you could update to return an object:
Copy code
type Query {
   unreadMessages: Output
}

type Output {
  count: Number
}
and change your resolver to return
return {count: unreadMessages.length}
something like that?
it’s either that or could be something to do with scalars..