Unable to sort blog posts by last or first publication date

I am trying to sort my blog posts but unfortunately, I am getting a weird ordering no matter what. Code and screenshot below as well as console log output. Not sure if this is a prismic or a sveltekit issue but I did do an npm update and everything seems to be in order. Even tried first_publication_date desc but still no luck.

<script context="module">
    import PrismicDom from "prismic-dom";
    import Client from "../../../utils/client";
    import Prismic from "@prismicio/client";
    export async function load() {
        const document = await Client.query(
            Prismic.Predicates.at("document.type", "blog_post"),
            { orderings: "[blog_post.last_publication_date]" }
        );
        return {
            props: {
                document,
            },
        };
    }
</script>
2021-07-15T21:22:14+0000
2021-07-05T15:31:11+0000
2021-07-06T16:08:36+0000
2021-07-15T22:47:06+0000

Hey @teddy_stanowski ,

This looks like a syntax issue. I believe this is what you want:

 { orderings: "[document.last_publication_date]" }

Let me know if that works.

(And here's more info on how predicate paths work, in case you're curious.)

Sam

This thread has been closed due to inactivity. Flag to reopen.