Closed maxfrischknecht closed 3 years ago
Which error do you get with the second query?
Somehow it started working at some point. The problem was probably elsewhere 🤔. However, for future reference, this works:
const response = await $axios.post('api/query', {
query: "page('projects/" + params.slug + "')",
select: {
title: true,
nextProject: {
query: 'page.next',
select: {
title: true,
previewImage: {
query: 'page.previewImage.toFile'
}
}
}
}
)}
)}
I'm trying to query for the next/prev sibling entry on a page like so:
It basically works an returns the whole page as an object:
However, when I try to specify the query, for example like below, I get an error.
I'm sure this is only a question of writing the query correctly, but since there is no documentation regarding this, I'm currently lost and appreciate all tipps & helps.