impowski
02/28/2019, 12:20 PMJenkins
02/28/2019, 12:27 PMimpowski
02/28/2019, 12:39 PMbull
for example and add a task to run that aggregation.Jenkins
02/28/2019, 12:53 PMquery {
sentMessagesLastMonth(userId: ID!) {
count
}
}
or something similar.
And behind that you'd be querying the db with something like:
const resolver = (parent, args, ctx) => {
return ctx.db.query.messagesConnection({where: {
userId: args.userId
}, filter: {
// your filters go here
}}, `{ count }`);
};
this is just me pulling syntax out of my ass, but that's the general gist.Jenkins
02/28/2019, 12:57 PM