Skip to content

API response total should be the total of all entities in the datastore #352

@elliot-ausocean

Description

@elliot-ausocean

Currently we return the number of entities in the current response (eg 20 if the response returned 20 objects). This makes little sense as the client already knows the length of the results array or can find it very easily. Using the name total in this context is also confusing as it sounds like the total number in the datastore, rather than the total returned by the query. This behaviour does not seem to be documented anywhere so it is not known if this is intended. I believe that it should return the total number of entities that match the query instead, which would be much more useful. This will require running an extra aggregation query alongside the normal query.

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