mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
82c0c65bd0
NOTE: This PR is stacked on #756 and should be shipped after that is merged. This PR enables the existing aggregate relationships work (see #725, #731, #756) by default by removing the experimental flag it used to be disabled behind. The new OpenDD schema changes that were added are also unhidden so that they are visible in the OpenDD JSON Schema. V3_GIT_ORIGIN_REV_ID: cfd86d8a9ea61887ccf0f1a5d08bdcc3dda59cdc
1.1 KiB
1.1 KiB
Changelog
Unreleased
Added
Aggregates of Array Relationships
Aggregates of array relationships can now be defined by specifying an
aggregate
in the Relationship
's target. Note that this is only supported
when the target of the relationship is a Model
. You must also specify the
aggregateFieldName
under the graphql
section.
kind: Relationship
version: v1
definition:
name: invoices
sourceType: Customer
target:
model:
name: Invoice
relationshipType: Array
aggregate: # New!
aggregateExpression: Invoice_aggregate_exp
description: Aggregate of the customer's invoices
mapping:
- source:
fieldPath:
- fieldName: customerId
target:
modelField:
- fieldName: customerId
graphql: # New!
aggregateFieldName: invoicesAggregate
Changed
Fixed
v2024.06.13
Initial release.