On behalf of Celanese.
There are some limitations on the aggregation API that we would like to enhance.
- It is not possible to aggregate edges
Given the following object types in a random data model, where one reporting site is connected to many reporting units. One Reporting Unit can be connected to Many Reporting Sites.
Today it is not possible to aggregate how many reporting sites are associated with a specific reporting unit, and that is a common use case.
type ReportingSite {
name: String!
description: String
reportingUnits: [ReportingUnit]
}
type ReportingUnit {
name: String
description: String
}
https://api-docs.cognite.com/20230101/tag/Instances/operation/aggregateInstances
The endpoint for aggregation only accepts a specific view to aggregate, not an edge connection.
- The aggregation API of Cognite has several limitations; we cannot group by date. More complex filters do not work either. Aggregations are limited to primitive fields in the GraphQL API.
- Using the GraphQL API, we cannot filter an object type based on its edge. For example, querying the reporting sites associated with a specific reporting unit is not possible.