Skip to content

Commit 88bbe1a

Browse files
committed
feat: import pg-aggregates plugin with Constructive adaptations
Import @graphile/pg-aggregates v5 branch via git subtree, then adapt for Constructive's codebase conventions and custom connection-filter fork. Changes from upstream: - Build system: yarn/tsc → pnpm/makage with CJS+ESM outputs - Imports: Replace subpath exports (postgraphile/grafast, graphile-build-pg/@dataplan/pg) with direct package imports for moduleResolution: node compatibility - FilterRelationalAggregatesPlugin: Read from $where._manyRelation (our ConnectionFilterBackwardRelationsPlugin) instead of upstream's $where.extensions.pgFilterRelation - Plugin ordering: before ConnectionFilterArgPlugin (our fork's name) - Field naming: Aggregate sub-filter field renamed from 'filter' to 'where' - Version: Inline const version instead of require('../package.json') - Remove .js extensions from local imports - Add PgConditionExtensions augmentation for pgFilterAttribute - Add graphile-connection-filter and grafast as peer dependencies - Wire PgAggregatesPreset into ConstructivePreset in graphile-settings - Remove upstream test files, eslint config, yarn.lock, graphile.config.js Provides: aggregates field on connections (sum, avg, min, max, stddev, variance, distinctCount), groupedAggregates with groupBy + having, orderBy relational aggregates, filter by relational aggregates. Per-table opt-out via @behavior -aggregates smart tag.
1 parent 1d62d01 commit 88bbe1a

48 files changed

Lines changed: 3638 additions & 23172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

graphile/graphile-pg-aggregates/README.md

Lines changed: 37 additions & 513 deletions
Large diffs are not rendered by default.

graphile/graphile-pg-aggregates/__tests__/__snapshots__/schema.test.ts.snap

Lines changed: 0 additions & 4020 deletions
This file was deleted.

graphile/graphile-pg-aggregates/__tests__/date_trunc_aggregate_group_specs_plugin.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

graphile/graphile-pg-aggregates/__tests__/helpers.ts

Lines changed: 0 additions & 84 deletions
This file was deleted.

graphile/graphile-pg-aggregates/__tests__/queries/__snapshots__/averageDurationByYearOfRelease.test.ts.snap

Lines changed: 0 additions & 92 deletions
This file was deleted.

graphile/graphile-pg-aggregates/__tests__/queries/__snapshots__/averageGoalsOnDaysWithAveragePointsOver200.test.ts.snap

Lines changed: 0 additions & 39 deletions
This file was deleted.

graphile/graphile-pg-aggregates/__tests__/queries/__snapshots__/filmAggregates.test.ts.snap

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)