graphql-engine/server/src-lib/Hasura/GraphQL/Schema
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
..
BoolExp server: Add an ExperimentalFeatureFlag for Aggregation Predicates 2022-10-25 13:21:40 +00:00
Action.hs Resolve source customization at schema cache building time. 2022-09-12 16:07:26 +00:00
Backend.hs Extract out functions from columnParser in Backend. 2022-09-13 21:22:25 +00:00
BoolExp.hs server/postgres: Implement execution of aggregation predicates 2022-09-16 15:01:03 +00:00
Build.hs Remove spaces before colons in error messages and descriptions 2022-10-01 14:48:58 +00:00
Common.hs scaffolding for remote-schemas module 2022-10-21 03:15:04 +00:00
Instances.hs Rename Data Wrapper to Data Connector [GDW-89] 2022-05-02 05:04:07 +00:00
Introspect.hs simplify type collection for introspection 2022-10-25 11:13:38 +00:00
Mutation.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
NamingCase.hs server: transform enum with upper for graphql-default 2022-07-19 06:56:45 +00:00
Node.hs server: import local Postgres modules as Postgres 2022-09-21 11:35:50 +00:00
Options.hs server: Add an ExperimentalFeatureFlag for Aggregation Predicates 2022-10-25 13:21:40 +00:00
OrderBy.hs GDC-189 custom aggregations 2022-10-27 00:44:06 +00:00
Parser.hs refactor(tests): Expose more Parser types in Hasura.GraphQL.Schema.Parser 2022-09-08 13:57:18 +00:00
Postgres.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00
Relay.hs Resolve source customization at schema cache building time. 2022-09-12 16:07:26 +00:00
Remote.hs scaffolding for remote-schemas module 2022-10-21 03:15:04 +00:00
RemoteRelationship.hs scaffolding for remote-schemas module 2022-10-21 03:15:04 +00:00
Select.hs GDC-189 custom aggregations 2022-10-27 00:44:06 +00:00
SubscriptionStream.hs server: add metadata origin in streaming subscription field parser 2022-09-27 15:56:46 +00:00
Table.hs Improve description for table select columns enum type 2022-10-03 11:00:10 +00:00
Typename.hs Move MkTypename and NamingCase into their own modules. 2022-07-12 14:01:28 +00:00
Update.hs Use a different reader context for sources and remote schemas with new SchemaT monad. 2022-09-06 16:49:23 +00:00