Commit c0fd7f7
committed
feat: adapt pg-aggregates for Constructive conventions
Adapt the imported @graphile/pg-aggregates v5 sources for Constructive's
codebase conventions and custom connection-filter fork.
Changes from upstream:
- Build system: yarn/tsc → pnpm/makage with CJS+ESM outputs
- Remove upstream config files (.yarn, .yarnrc.yml, .eslintignore,
.prettierrc.js, .jest-babel-transform.js, jest.config.js, etc.)
- Remove upstream test files (depend on yarn/jest infrastructure)
- 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
- Update schema snapshots in graphql/test and graphql/server-test
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 8c4b009 commit c0fd7f7
57 files changed
Lines changed: 5333 additions & 24156 deletions
File tree
- graphile
- graphile-pg-aggregates
- .yarn/releases
- __tests__
- __snapshots__
- queries
- __snapshots__
- src
- graphile-settings
- src/presets
- graphql
- server-test/__tests__/__snapshots__
- test/__tests__/__snapshots__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 942 deletions
This file was deleted.
This file was deleted.
0 commit comments