Graphql - Pagination - Total count of filtered items is wrong

System Information
  • Strapi Version: 4.8
  • Operating System: Linux
  • Database: MariaDB
  • Node Version: v16.20.0
  • NPM Version:
  • Yarn Version:

Hello,

I have an issue when querying the DB with Graphql while paginating and filtering. The total count of items is wrong, but only on my online environments. The issue is not met in local development.

I have a graphql query that looks like this :

query signalTickets {
  tickets (
    sort: "updatedAt:desc"
    filters: {
      and: [
        { isSignal: { eq: true } }
        { isImportant: {eq: false} }
      ]
    }
    pagination: { page: 1, pageSize: 10 })
  {
    data {
      id
      attributes {
        title
      }
    }
    meta {
      pagination {
        total
        pageCount
        page
      }
    }
  }
}

And the ouput :

{
  "data": {
    "tickets": {
      "data": [
        {
          "id": "3077",
          "attributes": {
            "title": "Signalement Test"
          }
        }
      ],
      "meta": {
        "pagination": {
          "total": 2,
          "pageCount": 1,
          "page": 1
        }
      }
    }
  }
}

As you can see, the total is wrong. I get 1 ticket, but it counts 2.

I see the issue was raised a couple of years ago, but apparently got fixed. Anyone encountered it lately ?

Thank you !

Hugs