Moritz
02/07/2018, 6:45 PMlast
or skip
? Example Query:
const post = await ctx.db.query.posts(
{
where: {id: postId},
},
`{
id
text
}`
)
I would like to get only the last 10 posts for performance. Whats the way to go? (Sorry, Im really not getting the hang of where to find answers to these questions in the docs)nilan
02/07/2018, 6:50 PMMoritz
02/07/2018, 6:54 PMnilan
02/07/2018, 6:55 PMwhere
argumentnilan
02/07/2018, 6:56 PM{
where: {id: postId},
last: 42
},
Moritz
02/07/2018, 6:59 PMnilan
02/07/2018, 7:01 PMMoritz
02/07/2018, 7:12 PMlast
is nested in a mutations return value, i.e.
const res = await ctx.db.mutation.updateBlog({
where: { id: blogId },
data: {
...
}
}, `{
id
posts{
id
}
}`)
I am trying to limit the number of posts returned from the mutation defined as a raw String. Is that possible?nilan
02/07/2018, 7:14 PMMoritz
02/07/2018, 7:14 PMnilan
02/07/2018, 7:15 PMMoritz
02/07/2018, 7:16 PMnilan
02/07/2018, 7:17 PM