Suman
(Suman Singh)
1
Hello,
I want to count notification having acknowledgement false. So, I have write this
{
userNotification as var(func: uid(0xf7ead)){
notification @filter(eq(notification_acknowledgement, false)){
uid
}
}
getNotificationCounter(func: uid(userNotification)){
notificationCounter : count(notification)
}
}
But output is always give count of total notification not only those having acknowledgement false.
Please help me where I am wrong.
Hi, can you do it all in one query. Something like
q(func: uid(0xf7ead)){
num_notifications : count(notification @filter(eq(notification_acknowledgement, false)))
}
There’s an example of counts and filters in this section of the docs (last example before next section)
https://docs.dgraph.io/query-language/#uid
Suman
(Suman Singh)
3
@michaelcompton Thanks, it worked for me
system
(system)
Closed
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.