I don't know what the problem is. This did work a couple of weeks ago. I got busy so I have had no time to code but I came back to my code and having $prismic.api.query('') as an empty string but I get undefined in the console log. I have tried everything. Also, when I use $prismic.api.getSingle('blog_post') I do get data but it only shows the post that was last uploaded and not every document.
This is my code in index.vue:
async asyncData({ $prismic }) {
const { data } = await $prismic.api.query('');
console.log('data', data);
return { data }
}