graphql-engine/dc-agents/dc-api-types
David Overton 9921823915 GDC-189 custom aggregations
>

## Description
->

This PR allows DC agents to define custom aggregate functions for their scalar types.

### Related Issues
->

GDC-189

### Solution and Design
>

We added a new property `aggregate_functions` to the scalar types capabilities. This allows the agent author to specify a set of aggregate functions supported by each scalar type, along with the function's result type.

During GraphQL schema generation, the custom aggregate functions are available via a new method `getCustomAggregateOperators` on the `Backend` type class.
Custom functions are merged with the builtin aggregate functions when building GraphQL schemas for table aggregate fields and for `order_by` operators on array relations.

### Steps to test and verify
>

• Codec tests for aggregate function capabilities have been added to the unit tests.
• Some custom aggregate operators have been added to the reference agent and are used in a new test in `api-tests`.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6199
GitOrigin-RevId: e9c0d1617af93847c1493671fdbb794f573bde0c
2022-10-27 00:44:06 +00:00
..
src GDC-189 custom aggregations 2022-10-27 00:44:06 +00:00
package.json GDC-189 custom aggregations 2022-10-27 00:44:06 +00:00
README.md Move Typescript types for Data Connector agent into their own package 2022-09-05 06:09:23 +00:00
tsconfig.json Move Typescript types for Data Connector agent into their own package 2022-09-05 06:09:23 +00:00

Hasura GraphQL Engine Data Connector Agent API Types

This package contains TypeScript types that Data Connector agents implemented in TypeScript could use to correctly implement the API required.

The Data Connector Reference agent can be used as an example of these types being used in practice to implement a Data Connector agent.