Hi all, happy new year first of all! With the new year, I realized my code becomes invalid since I was querying the posts I had within 2023 which is nothing. I was trying to find a way to query all posts I had in 2022 and 2023, but can't seem to run a code for a date range or multiple years. Weird since this shouldn't be difficult but couldn't find an answer around even on the docs. Could I get some help on this?
const allBlogPosts = await $prismic.api.query(
[
$prismic.predicates.year("my.post.date", new Date().getFullYear()),
$prismic.predicates.at("document.type", "post"),
],
{
orderings: "[document.last_publication_date desc]",
// orderings: "[my.post.date desc]",
fetchLinks: ["author.name", "author.picture"],
pageSize: 20,
page: 1,
}
);