I'm building a blog and I'm wondering how should I handle the getStaticPaths if the blogs are stored at Supabase...
The blog will have thousands of entries someday. How can I handle the supabase limits?
Now, my code goes like this.
export const getStaticPaths: GetStaticPaths = async () => {
const { data: posts, error } = await supabase
.from("post")
.select("slug")
.eq("published", true);
if (error || !posts) {
return { paths: [], fallback: "blocking" };
}
const paths = [];
for (const post of posts) {
paths.push(
{ params: { slug: post.slug }, locale: "en" },
{ params: { slug: post.slug }, locale: "es" }
);
}
return { paths, fallback: false };
};
But I'm afraid that if I overpass the limit, my app will not fetch all the existing blogposts
Thanks