Pagination in tailor does not work if retrieving post via relationship

<article id="post" class="documentation_info">
    {% set posts = blog.whereRelation('categories', 'slug', category.slug).paginate(2) %}
    <div class="container pb-3">
        {% for post in posts %}
            {% partial "post-card" post=post %}
        {% endfor %}

        {{ posts.links|raw }}
    </div>
</article>

here posts.links does not work, what am I doing wrong?

There is a working example in this file in the demo theme, shipped with v3:

  • themes/demo/pages/blog/author.htm
{% set authorPosts = blog.whereRelation('author', 'slug', author.slug).paginate(16) %}

{{ authorPosts.links|raw }}