Skip to content

RootQueryToProductUnionConnection.found is null when after is not null #956

@lewebsimple

Description

@lewebsimple

I'm trying to display the total number of products found for a paginated query so I set a reactive variable on RootQueryToProductUnionConnection.found but as soon as I set after to something other than null, found becomes null.

This seems intentional as Product_Connection_Resolver::get_query_args() sets no_found_rows to true when cursor offsets are not empty. (bypassing this manually returns a wrong value as the skipped nodes are not counted)

Is there a way to access the product count in every request?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions