Commit 88bbe1a
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
File tree
- graphile
- graphile-pg-aggregates
- __tests__
- __snapshots__
- queries
- __snapshots__
- src
- graphile-settings
- src/presets
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
Lines changed: 0 additions & 4020 deletions
This file was deleted.
Lines changed: 0 additions & 50 deletions
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 92 deletions
This file was deleted.
Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 0 additions & 40 deletions
This file was deleted.
0 commit comments