Moritz
03/13/2018, 10:01 AMwall
by id
and also query the connected posts on that wall like so. However, I would like to impose an after: ID!
quering only the posts posted after a certain id. These are my data models: type Wall{
id: ID! @unique
posts: [Post!]!
}
type Post {
id: ID! @unique
author: User!
wall: Wall!
}
and my resolver: wall(parent, { id, after }, ctx: Context, info) {
return ctx.db.query.wall(
{
where: {
id
}
},
info
);
},
Now, I would like to limit the returned posts requested via the info object. What is the recommended design for this? Should I manipulate the info object? Or can I somehow change the post resolver that prisma would automatically use above to a custom resolver? Thanks!