Hello ๐ Interesting post!
The user -> publications -> post query appears to return only 6 entries and not support pagination. Have you found an undocumented workaround or an alternative query?
I also noticed your post detail page no longer works on your Nuxt site.
I also just wanted to note a security concern you may want to addressโyour API key is exposed in the Authorization header. You may not be aware, but this token allows both read and write privileges. A bad actor could create posts on your blog without you knowing since your key is exposed.
From the developer dashboard:
Personal Access Token is like a private key to your Hashnode account [...] Never disclose your access tokens and always keep them private.
If you use Nuxt as a static site generator, you can work around this by implementing asyncData() with a process.server check so that you only make the request when you're generating your website server-side, that way your token is not exposed:
export default Vue.extend({
components: {
// ...
},
asyncData () {
if (process.server) {
return getPosts()
.then((data) => {
return {
posts: data.posts
}
})
}
return {
posts: []
};
},
data() {
return {
posts: []
};
},
})