Skip to content

[Enhancement]: Add Support for Record Count in GraphQL Responses #2754

@Alekhya-Polavarapu

Description

@Alekhya-Polavarapu

Currently, our GraphQL implementation does not support returning the total number of records in a query response. For example, the following pattern is not supported:

query {
  publishers {
    items {
      count
    }
  }
}

Current Workaround:

Customers are using aggregation as a workaround:

query {
  publishers {
    groupBy {
      aggregations {
        count(field: id)
      }
    }
  }
}

However, this approach has limitations:

  • Aggregations are only supported on numeric fields.

  • If a table does not contain any numeric fields, this workaround fails.

Proposed Enhancement:
Introduce native support for returning the total count of records in GraphQL queries, independent of field types.

Impact:
Improves developer experience and consistency.
Enables accurate pagination and UI rendering for datasets without numeric fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions