Skip to content

How to make aggregate query #15

Open
@sondh0127

Description

@sondh0127

Does the plugin generate the "aggregate" query

I have a query to fetch the "project" list with the pagination(offset and limit) and also want to get the total number of the list by (projects_aggregate)

query ExploreProjects(
  $name: String
  $offset: Int
  $limit: Int
) {
  projects_aggregate(
    where: {
      ...
    }
  ) {
    aggregate {
      count
    }
  }
  projects(
    limit: $limit
    offset: $offset
    order_by: { updated_at: desc }
    where: {
      ...
    }
  ) {
    ...Project
  }
}

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