Skip to content

[Bug]: GraphQL Aggregation features do not exist in DAB 2.0.0-rc schema #3396

@JerryNixon

Description

@JerryNixon

Neither aggregates nor groupBy exist in the GraphQL schema.

  1. Aggregation groupBy argument not available
  2. Aggregation HAVING not available
  3. Aggregation DISTINCT not available

Expected

GraphQL supports aggregates and groupBy for SQL Server entities, including:

sum, average, min, max, count
groupBy: { fields: [...] }
having filters on aggregates
distinct: true on count

Schema

{"fields": [
  {"name": "items"},
  {"name": "endCursor"},
  {"name": "hasNextPage"},
  {"name": "groupBy"}  // exists as a FIELD on the connection, not as a query argument
]}

Reproduct

# All of these fail with "field does not exist" or "argument does not exist"

# 1. Basic aggregation
{ todos { aggregates { id { count } } } }
# Error: "The field `aggregates` does not exist on the type `TodoConnection`."

# 2. groupBy as argument
{ todos(groupBy: { fields: ["completed"] }) { items { completed } } }
# Error: "The argument `groupBy` does not exist."

# 3. Aggregate without groupBy
{ todos { aggregates { id { sum average min max count } } } }
# Error: "The field `aggregates` does not exist on the type `TodoConnection`."

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions