UNPKG

@dataplan/pg

Version:
851 lines (701 loc) 109 kB
# @dataplan/pg ## 0.0.1-beta.37 ### Patch Changes - [#2686](https://github.com/graphile/crystal/pull/2686) [`5dbb9e8`](https://github.com/graphile/crystal/commit/5dbb9e87850ce8de29ab4fec18c9d06333b642de) Thanks [@benjie](https://github.com/benjie)! - Fix a bug with mutations where the results of computed columns were calculated using the snapshot from before the mutation (due to the way Postgres works). Solved by breaking the post-mutation function calls out into a separate post-mutation statement. - [#2692](https://github.com/graphile/crystal/pull/2692) [`3d5c464`](https://github.com/graphile/crystal/commit/3d5c4641df66b431066efd6c74b67ca0d38ba7f4) Thanks [@benjie](https://github.com/benjie)! - Allow forbidding certain objects/functions from being exported, and raise error as early as possible. - [#2679](https://github.com/graphile/crystal/pull/2679) [`05b971e`](https://github.com/graphile/crystal/commit/05b971e2d63cb5c946512bb83e6c255a7d9ec93f) Thanks [@benjie](https://github.com/benjie)! - Warns user if sqlValueWithCodec is called with a Step - [#2691](https://github.com/graphile/crystal/pull/2691) [`703d162`](https://github.com/graphile/crystal/commit/703d162df2cc148ac343c1339b8e7df750aa781d) Thanks [@benjie](https://github.com/benjie)! - Deprecate `withPgClient`/`withPgClientTransaction` because people are using them incorrectly and causing themselves N+1 issues. Instead, rename to `sideEffectWithPgClient` and introduce new `loadOneWithPgClient` and `loadManyWithPgClient` helpers that people should use instead of `withPgClient`. - [#2678](https://github.com/graphile/crystal/pull/2678) [`6dafac1`](https://github.com/graphile/crystal/commit/6dafac162955291e5147c21e57734b44e30acb98) Thanks [@benjie](https://github.com/benjie)! - Remove peer dependency optionality in an attempt to satisfy pnpm's installation algorithms - [#2695](https://github.com/graphile/crystal/pull/2695) [`e2048e2`](https://github.com/graphile/crystal/commit/e2048e260bf99ed946f92d6ea579e08f126ba4d5) Thanks [@benjie](https://github.com/benjie)! - Don't allow `EXPLAIN ANALYZE` of mutations - Updated dependencies [[`cfd4c3c`](https://github.com/graphile/crystal/commit/cfd4c3cff0ef40ed87a2c700b7719c1ca0e73588), [`c3f9c38`](https://github.com/graphile/crystal/commit/c3f9c38cb00ad4553e4bc3c04e16a7c77bd16142), [`13513dd`](https://github.com/graphile/crystal/commit/13513ddaea15ad9498a77de7c4e92679498f99ca), [`bc2b188`](https://github.com/graphile/crystal/commit/bc2b188a50e00f153dc68df6955399c5917130bd), [`c13813e`](https://github.com/graphile/crystal/commit/c13813eecb42c0d9a6703540c022e318e18c5751), [`4a9072b`](https://github.com/graphile/crystal/commit/4a9072bfa3d3e86c6013caf2b89a31e87f2bb421), [`6dafac1`](https://github.com/graphile/crystal/commit/6dafac162955291e5147c21e57734b44e30acb98), [`e15f886`](https://github.com/graphile/crystal/commit/e15f886cae1041416b44b74b75426f8d43000dcf), [`34efed0`](https://github.com/graphile/crystal/commit/34efed09892d4b6533f40026de4a6b0a8a35035d), [`185d449`](https://github.com/graphile/crystal/commit/185d449ed30d29c9134cc898b50a1473ab2910a2)]: - graphile-config@0.0.1-beta.18 - grafast@0.1.1-beta.26 ## 0.0.1-beta.36 ### Patch Changes - [#2652](https://github.com/graphile/crystal/pull/2652) [`2adfd6e`](https://github.com/graphile/crystal/commit/2adfd6efedd1ab6831605526a515c683a7e95c2c) Thanks [@benjie](https://github.com/benjie)! - Make `get($step, attr)` more type-safe when the underlying steps implement the new `__inferGet` pattern. - Updated dependencies [[`2adfd6e`](https://github.com/graphile/crystal/commit/2adfd6efedd1ab6831605526a515c683a7e95c2c), [`6113518`](https://github.com/graphile/crystal/commit/61135188900c39d0cb6bd2f9c0033f0954cd0e6a)]: - @dataplan/json@0.0.1-beta.33 - grafast@0.1.1-beta.25 ## 0.0.1-beta.35 ### Patch Changes - [#2571](https://github.com/graphile/crystal/pull/2571) [`5451c90`](https://github.com/graphile/crystal/commit/5451c9031e341bdae16dc1b7a3b6b19154056701) Thanks [@slaskis](https://github.com/slaskis)! - Add support for JSONPath type (thanks @slaskis!) - [#2571](https://github.com/graphile/crystal/pull/2571) [`7147cb0`](https://github.com/graphile/crystal/commit/7147cb07e4d7286bb3b9e949164a2a232d59e28c) Thanks [@slaskis](https://github.com/slaskis)! - 🚨 Give built-in codecs a concept of "natural sorting" and "natural equality"; disable ordering by default for those without natural sorting, disable filtering by default for those without natural equality. Those using AmberPreset will have some order enum options and filter options removed from their schema; V4 preset users should be unaffected. To restore the previous items, a small plugin can be introduced, see: https://github.com/slaskis/crystal/blob/bb940399a3a741c0982b53fffbe4604eebe6ffb0/postgraphile/postgraphile/src/plugins/PgV4BehaviorPlugin.ts#L81-L98 - [#2593](https://github.com/graphile/crystal/pull/2593) [`7847c0b`](https://github.com/graphile/crystal/commit/7847c0b09aa6be5526df8ccdb3f429e680a2da03) Thanks [@benjie](https://github.com/benjie)! - Fixes a bug where ordering or filtering by 'via' attributes (such as those from polymorphic 'relational' tables) resulted in an error. - [#2605](https://github.com/graphile/crystal/pull/2605) [`9d86063`](https://github.com/graphile/crystal/commit/9d86063aacf2d064c35bd62e2cf58ea687910ac8) Thanks [@benjie](https://github.com/benjie)! - Tweak deps/peerDeps. - [#2593](https://github.com/graphile/crystal/pull/2593) [`0e6c4e0`](https://github.com/graphile/crystal/commit/0e6c4e062be3ecb79c0ae30c89fad1550a0b5e98) Thanks [@benjie](https://github.com/benjie)! - 🚨 `resource.resolveVia()` has changed result format; from `{ relation: string, attribute: string }` to `{ relationName: string, attributeName: string, relation: PgCodecRelation, attribute: PgCodecAttribute }`. If you use `resolveVia`, please be sure to extract the correct properties. - [#2600](https://github.com/graphile/crystal/pull/2600) [`ad588ec`](https://github.com/graphile/crystal/commit/ad588ecde230359f56800e414b7c5fa1aed14957) Thanks [@benjie](https://github.com/benjie)! - Mark all peerDependencies=dependencies modules as optional peerDependencies to make pnpm marginally happier hopefully. - Updated dependencies [[`c54c6db`](https://github.com/graphile/crystal/commit/c54c6db320b3967ab16784a504770c9b5ef24494), [`ad588ec`](https://github.com/graphile/crystal/commit/ad588ecde230359f56800e414b7c5fa1aed14957)]: - grafast@0.1.1-beta.24 ## 0.0.1-beta.34 ### Patch Changes - [#2577](https://github.com/graphile/crystal/pull/2577) [`0c6b1f1`](https://github.com/graphile/crystal/commit/0c6b1f1e188f6e2913832adfed9ca76dfdc25c47) Thanks [@benjie](https://github.com/benjie)! - Update dependencies - Updated dependencies [[`0c6b1f1`](https://github.com/graphile/crystal/commit/0c6b1f1e188f6e2913832adfed9ca76dfdc25c47), [`e0cdabe`](https://github.com/graphile/crystal/commit/e0cdabe25c8894da550546c93bc03b895585544c)]: - graphile-config@0.0.1-beta.17 - grafast@0.1.1-beta.23 - @dataplan/json@0.0.1-beta.32 ## 0.0.1-beta.33 ### Patch Changes - [#2525](https://github.com/graphile/crystal/pull/2525) [`070467c4ea693a2516fc8006bebb88b1ab96fb26`](https://github.com/graphile/crystal/commit/070467c4ea693a2516fc8006bebb88b1ab96fb26) Thanks [@benjie](https://github.com/benjie)! - Avoid unnecessary self-joins when inlining a `pgSelectFromRecord` step into a parent PgSelectStep. - [#2478](https://github.com/graphile/crystal/pull/2478) [`a830770e775a65ce1d09fa767f38e84f5c0e5139`](https://github.com/graphile/crystal/commit/a830770e775a65ce1d09fa767f38e84f5c0e5139) Thanks [@benjie](https://github.com/benjie)! - Use new .addRef and .getRef methods from grafast. - [#2482](https://github.com/graphile/crystal/pull/2482) [`459e1869a2ec58925b2bac5458af487c52a8ca37`](https://github.com/graphile/crystal/commit/459e1869a2ec58925b2bac5458af487c52a8ca37) Thanks [@benjie](https://github.com/benjie)! - Minimum version of Node.js bumped to Node 22 (the latest LTS). - [#2517](https://github.com/graphile/crystal/pull/2517) [`455f4811d37ad8fff91183c7a88621bcf9d79acf`](https://github.com/graphile/crystal/commit/455f4811d37ad8fff91183c7a88621bcf9d79acf) Thanks [@benjie](https://github.com/benjie)! - Various of our steps weren't as crisp on types as they could be. This makes them a lot stricter: - `coalesce()` now yields `null` if it fails - `each()` now reflects the type of the list item even if it's not a "list capable" step - `loadOne()`/`loadMany()` can now track the underlying nullability of the callback (can differentiate `Maybe<ReadonlyArrray<Maybe<Thing>>>` from `ReadonlyArray<Maybe<Thing>>` from `ReadonlyArray<Thing> | null` etc) - `pgSelectFromRecord` (for `@dataplan/pg` users) no longer requires a mutable array 🚨 This will potentially break your plan types quite a bit. In particular, the `LoadOneCallback` and `LoadManyCallback` types now have 5 (not 4) generic parameters, the new one is inserted in the middle (after the second parameter) and indicates the true return type of the callback (ignoring promises) - e.g. `Maybe<ReadonlyArray<Maybe<ItemType>>>` for `LoadManyCallback`. They have sensible defaults if you only specify the first two generics. - Updated dependencies [[`0e36cb9077c76710d2e407830323f86c5038126e`](https://github.com/graphile/crystal/commit/0e36cb9077c76710d2e407830323f86c5038126e), [`5a26196eff8fd1956d73e0b8fdf5cfcb7f01b7d3`](https://github.com/graphile/crystal/commit/5a26196eff8fd1956d73e0b8fdf5cfcb7f01b7d3), [`c0c3f48fa9f60cb9a4436ea135979b779ecc71ec`](https://github.com/graphile/crystal/commit/c0c3f48fa9f60cb9a4436ea135979b779ecc71ec), [`cef9a37f846b4af105ac20960530d65c9f44afa9`](https://github.com/graphile/crystal/commit/cef9a37f846b4af105ac20960530d65c9f44afa9), [`56ce94a847c6a4094643665cbf5d3712f56140b6`](https://github.com/graphile/crystal/commit/56ce94a847c6a4094643665cbf5d3712f56140b6), [`192a27e08763ea26607344a2ea6c7f5c595cc2a3`](https://github.com/graphile/crystal/commit/192a27e08763ea26607344a2ea6c7f5c595cc2a3), [`6ef6abce15936a896156d5316020df55cf7d18e3`](https://github.com/graphile/crystal/commit/6ef6abce15936a896156d5316020df55cf7d18e3), [`17b160d5450e20e0f5c6597d5cffe125ece49d65`](https://github.com/graphile/crystal/commit/17b160d5450e20e0f5c6597d5cffe125ece49d65), [`0239c2d519300a72f545e0db7c371adae4ade2a9`](https://github.com/graphile/crystal/commit/0239c2d519300a72f545e0db7c371adae4ade2a9), [`0ea439d33ccef7f8d01ac5f54893ab2bbf1cbd4d`](https://github.com/graphile/crystal/commit/0ea439d33ccef7f8d01ac5f54893ab2bbf1cbd4d), [`8034614d1078b1bd177b6e7fcc949420614e3245`](https://github.com/graphile/crystal/commit/8034614d1078b1bd177b6e7fcc949420614e3245), [`459e1869a2ec58925b2bac5458af487c52a8ca37`](https://github.com/graphile/crystal/commit/459e1869a2ec58925b2bac5458af487c52a8ca37), [`c350e49e372ec12a4cbf04fb6b4260e01832d12b`](https://github.com/graphile/crystal/commit/c350e49e372ec12a4cbf04fb6b4260e01832d12b), [`3176ea3e57d626b39613a73117ef97627370ec83`](https://github.com/graphile/crystal/commit/3176ea3e57d626b39613a73117ef97627370ec83), [`46a42f5547c041289aa98657ebc6815f4b6c8539`](https://github.com/graphile/crystal/commit/46a42f5547c041289aa98657ebc6815f4b6c8539), [`a87bbd76f1a8b60fd86de65922746d830cc160b4`](https://github.com/graphile/crystal/commit/a87bbd76f1a8b60fd86de65922746d830cc160b4), [`be3f174c5aae8fe78a240e1bc4e1de7f18644b43`](https://github.com/graphile/crystal/commit/be3f174c5aae8fe78a240e1bc4e1de7f18644b43), [`576fb8bad56cb940ab444574d752e914d462018a`](https://github.com/graphile/crystal/commit/576fb8bad56cb940ab444574d752e914d462018a), [`9f459101fa4428aa4bac71531e75f99e33da8e17`](https://github.com/graphile/crystal/commit/9f459101fa4428aa4bac71531e75f99e33da8e17), [`921665df8babe2651ab3b5886ab68bb518f2125b`](https://github.com/graphile/crystal/commit/921665df8babe2651ab3b5886ab68bb518f2125b), [`78bb1a615754d772a5fda000e96073c91fa9eba7`](https://github.com/graphile/crystal/commit/78bb1a615754d772a5fda000e96073c91fa9eba7), [`c9cd0cc72a4db4b02b2bdf770161c9346cb4b174`](https://github.com/graphile/crystal/commit/c9cd0cc72a4db4b02b2bdf770161c9346cb4b174), [`ab0bcda5fc3c136eea09493a7d9ed4542975858e`](https://github.com/graphile/crystal/commit/ab0bcda5fc3c136eea09493a7d9ed4542975858e), [`455f4811d37ad8fff91183c7a88621bcf9d79acf`](https://github.com/graphile/crystal/commit/455f4811d37ad8fff91183c7a88621bcf9d79acf), [`45adaff886e7cd72b864150927be6c0cb4a7dfe8`](https://github.com/graphile/crystal/commit/45adaff886e7cd72b864150927be6c0cb4a7dfe8)]: - grafast@0.1.1-beta.22 - pg-sql2@5.0.0-beta.9 - @dataplan/json@0.0.1-beta.31 - graphile-config@0.0.1-beta.16 - @graphile/lru@5.0.0-beta.4 ## 0.0.1-beta.32 ### Patch Changes - [#2397](https://github.com/graphile/crystal/pull/2397) [`d3ae3415c230784fdfefc9d192ad93aca462bceb`](https://github.com/graphile/crystal/commit/d3ae3415c230784fdfefc9d192ad93aca462bceb) Thanks [@benjie](https://github.com/benjie)! - Replace `postgres-array` module with our own 5x faster implementation. - [#2344](https://github.com/graphile/crystal/pull/2344) [`f6e22692b628703b8ea48e580dc0b6f0bcbc9c5a`](https://github.com/graphile/crystal/commit/f6e22692b628703b8ea48e580dc0b6f0bcbc9c5a) Thanks [@benjie](https://github.com/benjie)! - Avoid duplication of PgSelectRowsStep/PgUnionAllRowsStep. - [#2323](https://github.com/graphile/crystal/pull/2323) [`c3538050abbb485cf1d43f7c870b89f1ad7c2218`](https://github.com/graphile/crystal/commit/c3538050abbb485cf1d43f7c870b89f1ad7c2218) Thanks [@benjie](https://github.com/benjie)! - Add `.scopedSQL(sql => ...)` method to PgSelectStep, PgSelectSingleStep, PgUnionAllStep, PgUnionAllSingleStep; can be used to allow embedding of other _typed_ steps directly into an SQL expression without needing to use `$pgSelect.placeholder(...)` wrapper. Only works with steps that have a `pgCodec: PgCodec` property (typically those coming from PgSelectSingleStep accesses) since otherwise we don't currently know how to cast the value to Postgres. - [#2339](https://github.com/graphile/crystal/pull/2339) [`98c5009e21e423b0da22c2cb70cdb62909578f50`](https://github.com/graphile/crystal/commit/98c5009e21e423b0da22c2cb70cdb62909578f50) Thanks [@benjie](https://github.com/benjie)! - Move more logic to runtime, clean up plan diagrams, change how cursors work, fix pagination cursor signature in pgUnionAll, generally lay groundwork for runtime (rather than plantime) evaluation of custom ordering, conditions, etc. - [#2386](https://github.com/graphile/crystal/pull/2386) [`c8f1971ea4198633ec97f72f82abf65089f71a88`](https://github.com/graphile/crystal/commit/c8f1971ea4198633ec97f72f82abf65089f71a88) Thanks [@benjie](https://github.com/benjie)! - Process connection pagination cursors without requiring plantime evaluation of input step values. - [#2323](https://github.com/graphile/crystal/pull/2323) [`182ed0564104f59b012e0f9ffd452556b0927750`](https://github.com/graphile/crystal/commit/182ed0564104f59b012e0f9ffd452556b0927750) Thanks [@benjie](https://github.com/benjie)! - Internal refactoring around new PgStmtStep abstract class. - [#2407](https://github.com/graphile/crystal/pull/2407) [`be1e558d6a1a8cae3bf4b5724c340469d8837504`](https://github.com/graphile/crystal/commit/be1e558d6a1a8cae3bf4b5724c340469d8837504) Thanks [@benjie](https://github.com/benjie)! - Generating parameter analysis at runtime is unnecessarily expensive, allow callers to pass a parameter analysis that has been performed at plan-time and cached. - [#2326](https://github.com/graphile/crystal/pull/2326) [`84f06eafa051e907a3050237ac6ee5aefb184652`](https://github.com/graphile/crystal/commit/84f06eafa051e907a3050237ac6ee5aefb184652) Thanks [@benjie](https://github.com/benjie)! - Remove `$step.eval*()` from cursor pagination pageInfo. - [#2407](https://github.com/graphile/crystal/pull/2407) [`12d3a7174949794a1679132635e196f5dadce8a2`](https://github.com/graphile/crystal/commit/12d3a7174949794a1679132635e196f5dadce8a2) Thanks [@benjie](https://github.com/benjie)! - `getGroupDetails` added to PgSelectStep to allow aggregate plugin to output the (runtime influenced) keys. - [#2406](https://github.com/graphile/crystal/pull/2406) [`ab7658ac44e1a5a0a98c6bb688a26d94b1175cc1`](https://github.com/graphile/crystal/commit/ab7658ac44e1a5a0a98c6bb688a26d94b1175cc1) Thanks [@benjie](https://github.com/benjie)! - Restore inlining of PgSelectStep that was temporarily disabled during the rewrite. - [#2326](https://github.com/graphile/crystal/pull/2326) [`bc2a00d35f0a1954dba22e857adc3f4e2f5118e5`](https://github.com/graphile/crystal/commit/bc2a00d35f0a1954dba22e857adc3f4e2f5118e5) Thanks [@benjie](https://github.com/benjie)! - Remove `$input.eval*()` usage from pgSelect; instead construct related SQL/values at runtime. - [#2336](https://github.com/graphile/crystal/pull/2336) [`ceeb9a6b63e566b09298e0440a385943302ad0f9`](https://github.com/graphile/crystal/commit/ceeb9a6b63e566b09298e0440a385943302ad0f9) Thanks [@benjie](https://github.com/benjie)! - PgUnionAllStep now has static clone method and its constructor has been simplified. - [#2407](https://github.com/graphile/crystal/pull/2407) [`3e8c64bef928295494119e15e1e55cbdadb696fa`](https://github.com/graphile/crystal/commit/3e8c64bef928295494119e15e1e55cbdadb696fa) Thanks [@benjie](https://github.com/benjie)! - Adds `pgFromExpressionRuntime` helper to allow for creating functional from expressions at runtime, as needed by postgraphile-plugin-connection-filter. - [#2330](https://github.com/graphile/crystal/pull/2330) [`836c8327a5ca1bd3c69f72055e71d00694de363e`](https://github.com/graphile/crystal/commit/836c8327a5ca1bd3c69f72055e71d00694de363e) Thanks [@benjie](https://github.com/benjie)! - pgUnionAll now performs pagination logic at runtime rather than plantime. - [#2335](https://github.com/graphile/crystal/pull/2335) [`2f31836cb89a7ab27a8919803fe12b53a46d77e4`](https://github.com/graphile/crystal/commit/2f31836cb89a7ab27a8919803fe12b53a46d77e4) Thanks [@benjie](https://github.com/benjie)! - PgSelectStep and PgUnionAllStep now return objects rather than arrays/streams; thanks to the new Grafast .items() method and these classes being "opaque" steps this is _mostly_ a non-breaking change. - [#2377](https://github.com/graphile/crystal/pull/2377) [`7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7`](https://github.com/graphile/crystal/commit/7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7) Thanks [@benjie](https://github.com/benjie)! - Since `ModifierStep` and `BaseStep` are no more; `ExecutableStep` can be renamed to simply `Step`. The old name (`ExecutableStep`) is now deprecated. - [#2323](https://github.com/graphile/crystal/pull/2323) [`925689578ee9def403382df70f0e003bb299c166`](https://github.com/graphile/crystal/commit/925689578ee9def403382df70f0e003bb299c166) Thanks [@benjie](https://github.com/benjie)! - Expand sql scoping to many more PgSelect/PgSelectSingle/PgUnion/PgUnionSingle methods, such as .where(), .select(), etc via callback pattern. - [#2404](https://github.com/graphile/crystal/pull/2404) [`7001138c38e09822ad13db1018c62d2cac37941e`](https://github.com/graphile/crystal/commit/7001138c38e09822ad13db1018c62d2cac37941e) Thanks [@benjie](https://github.com/benjie)! - Be stricter about usage of `this.getDep(depId)` vs `this.getDepOptions(depId)`. - [#2336](https://github.com/graphile/crystal/pull/2336) [`3e188c2e981193d228ba3b7433f5e326336f629b`](https://github.com/graphile/crystal/commit/3e188c2e981193d228ba3b7433f5e326336f629b) Thanks [@benjie](https://github.com/benjie)! - PgSelectStep now has clone method and its constructor has been simplified. - [#2325](https://github.com/graphile/crystal/pull/2325) [`07a5469e5d3d050a7bcab928bb751c9e150d2e49`](https://github.com/graphile/crystal/commit/07a5469e5d3d050a7bcab928bb751c9e150d2e49) Thanks [@benjie](https://github.com/benjie)! - Move SQL construction to runtime rather than plantime. Get rid of `textForSingle` since we compile the SQL at runtime so we don't need to handle both cases. Add `$pgSelect.deferredSQL()` API to allow plans to yield (safe, thanks to pg-sql2) SQL to be composed into the query at runtime. - [#2424](https://github.com/graphile/crystal/pull/2424) [`e6da5d956ab696932410e7172cedfacba71dbf5e`](https://github.com/graphile/crystal/commit/e6da5d956ab696932410e7172cedfacba71dbf5e) Thanks [@benjie](https://github.com/benjie)! - Small tweaks to make exported schemas have nicer formatting. - [#2413](https://github.com/graphile/crystal/pull/2413) [`037a1bcdc8ed8493d4748e08c18f258e4382a815`](https://github.com/graphile/crystal/commit/037a1bcdc8ed8493d4748e08c18f258e4382a815) Thanks [@benjie](https://github.com/benjie)! - More inlining of PgSelectStep steps. - [#2335](https://github.com/graphile/crystal/pull/2335) [`72b300b436a7acedaa7d0e3a7a5458d15a0e5396`](https://github.com/graphile/crystal/commit/72b300b436a7acedaa7d0e3a7a5458d15a0e5396) Thanks [@benjie](https://github.com/benjie)! - PgSelectStep's stream behavior updated to match the latest logic in Grafast. - [#2407](https://github.com/graphile/crystal/pull/2407) [`770363214ee630746cddc9080dec22bbf38a3bb5`](https://github.com/graphile/crystal/commit/770363214ee630746cddc9080dec22bbf38a3bb5) Thanks [@benjie](https://github.com/benjie)! - Exposes PgCondition.resolveMode, which may be helpful for plans to figure out exactly what's going on. - [#2407](https://github.com/graphile/crystal/pull/2407) [`ba2bfa15deaaddd92757a56c2b761624afe940bd`](https://github.com/graphile/crystal/commit/ba2bfa15deaaddd92757a56c2b761624afe940bd) Thanks [@benjie](https://github.com/benjie)! - Add makeArgsRuntime helper to enable generating the argument expressions for a PostgreSQL function at runtime, as required by postgraphile-plugin-connection-filter. - [#2398](https://github.com/graphile/crystal/pull/2398) [`c041fd250372c57601188b65a6411c8f440afab6`](https://github.com/graphile/crystal/commit/c041fd250372c57601188b65a6411c8f440afab6) Thanks [@benjie](https://github.com/benjie)! - Since the following have been removed from Grafast, throw an error if they're seen in the schema: - `autoApplyAfterParentInputPlan` - `autoApplyAfterParentApplyPlan` - `autoApplyAfterParentPlan` - `autoApplyAfterParentSubscribePlan` - `inputPlan` - `applyPlan` on input fields Also: when Query type fails to build, throw the underlying error directly. - [#2384](https://github.com/graphile/crystal/pull/2384) [`6d19724330d50d076aab9442660fa8abddd095cb`](https://github.com/graphile/crystal/commit/6d19724330d50d076aab9442660fa8abddd095cb) Thanks [@benjie](https://github.com/benjie)! - Move postgresql argument logic to runtime (from plantime) to avoid plantime eval of input values. - [#2376](https://github.com/graphile/crystal/pull/2376) [`da6f3c04efe3d8634c0bc3fcf93ac2518de85322`](https://github.com/graphile/crystal/commit/da6f3c04efe3d8634c0bc3fcf93ac2518de85322) Thanks [@benjie](https://github.com/benjie)! - Overhaul Grafast to remove more input planning - inputs should be evaluated at runtime - and remove more plan-time step evaluation. `FieldArgs.get` is no more; use `FieldArgs.getRaw` or use `bakedInput()` (TODO: document) to get the "baked" version of a raw input value. Input object fields no longer have `applyPlan`/`inputPlan`, instead having the runtime equivalents `apply()` and `baked()`. `FieldArgs` is no longer available on input object fields, since these fields are no longer called at plantime; instead, the actual value is passed. `FieldArgs` gains `.typeAt(path)` method that details the GraphQL input type at the given path. Field arguments are no longer passed `FieldArgs`, instead they're passed a (similar) `FieldArg` object representing the argument value itself. `autoApplyAfterParentPlan` is no more - instead if an argument has `applyPlan` it will be called automatically unless it was called during the field plan resolver itself. `autoApplyAfterParentSubscribePlan` is no more - instead if an argument has `applySubscribePlan` it will be called automatically unless it was called during the field plan resolver itself. Field arguments no longer support `inputPlan` - use `bakedInput()` if you need that. Input fields no longer support `inputPlan`, `applyPlan`, `autoApplyAfterParentInputPlan` nor `autoApplyAfterParentApplyPlan`. Instead, `apply()` (which is called by `applyStep()` at runtime) has been added. `sqlValueWithCodec(value, codec)` can be used at runtime in places where `$step.placeholder($value, codec)` would have been used previously. `placeholder` has been removed from all places that are now runtime - namely the list of modifiers below... The following `ModifierStep` classes have all dropped their `Step` suffix, these `Modifier` classes now all run at runtime, and are thus no longer steps; they're invoked as part of the new `applyInput()` (TODO: document) step: - `ModifierStep` &rArr; `Modifier` - `PgBooleanFilterStep` &rArr; `PgBooleanFilter` - `PgClassFilterStep` &rArr; `PgClassFilter` - `PgConditionCapableParentStep` &rArr; `PgConditionCapableParent` - `PgConditionLikeStep` &rArr; `PgConditionLike` - `PgConditionStepMode` &rArr; `PgConditionMode` - `PgConditionStep` &rArr; `PgCondition` - `PgManyFilterStep` &rArr; `PgManyFilter` - `PgOrFilterStep` &rArr; `PgOrFilter` - `PgTempTableStep` &rArr; `PgTempTable` - `SetterCapableStep` &rArr; `SetterCapable` - `SetterStep` &rArr; `Setter` (Interestingly, other than the removal of `placeholder` and the fact they deal with runtime values rather than steps now, they're very similar to what they were before.) The deprecated forms of the above have been removed. Methods that rely on these modifier plans have been removed: - `PgUnionAllStep.wherePlan` - use `fieldArg.apply($unionAll, qb => qb.whereBuilder())` instead - `PgUnionAllStep.havingPlan` - use `fieldArg.apply($unionAll, qb => qb.havingBuilder())` instead - Same for PgSelectStep The following gain query builders: - `PgInsertSingle` - `PgUpdateSingle` - `PgDeleteSingle` Query builders gain `meta`, an object that can be augmented with metadata about the operation (typically this relates to cursors and similar functionality). This is now used to implement `clientMutationId`. Extends query builders with additional functionality. Many of the types have had their generics changed, TypeScript should guide you if you have issues here. `NodeIdHandler` now requires a `getIdentifiers` method that runs at runtime and returns the identifiers from a decoded NodeId string. Types around GraphQL Global Object Identification (i.e. `Node` / `id`) have changed. - [#2357](https://github.com/graphile/crystal/pull/2357) [`8026b982a81776fb3d1d808392970c2d678c4023`](https://github.com/graphile/crystal/commit/8026b982a81776fb3d1d808392970c2d678c4023) Thanks [@benjie](https://github.com/benjie)! - Start migrating away from `applyPlan`/`inputPlan`. ~~When adding an argument to a field you can now augment the field's plan resolver via `context.addToPlanResolver` hook~~ (this was later replaced with new `inputApply()` step, and arguments still keep `applyPlan` though input object fields lose it). Use this and other changes to move handling of orderBy to runtime from plantime. Introduces runtime query builder for `PgSelectStep` and `PgUnionAllStep`, and `PgSelectStep.apply()`/`PgUnionAllStep.apply()` so that you can register callbacks that will augment the query builder at runtime. - [#2311](https://github.com/graphile/crystal/pull/2311) [`d257a1a1e59a7d4da0bf67345c07b04c04a2f7da`](https://github.com/graphile/crystal/commit/d257a1a1e59a7d4da0bf67345c07b04c04a2f7da) Thanks [@benjie](https://github.com/benjie)! - Incorporate new getDepOrConstant/maybeGetDep features for better code ergonomics. - Updated dependencies [[`d34014a9a3c469154cc796086ba13719954731e5`](https://github.com/graphile/crystal/commit/d34014a9a3c469154cc796086ba13719954731e5), [`98516379ac355a0833a64e002f3717cc3a1d6473`](https://github.com/graphile/crystal/commit/98516379ac355a0833a64e002f3717cc3a1d6473), [`f8602d05eed3247c90b87c55d7af580d1698effc`](https://github.com/graphile/crystal/commit/f8602d05eed3247c90b87c55d7af580d1698effc), [`65df25534fa3f787ba2ab7fd9547d295ff2b1288`](https://github.com/graphile/crystal/commit/65df25534fa3f787ba2ab7fd9547d295ff2b1288), [`1b3c76efd27df73eab3a5a1d221ce13de4cd6b1a`](https://github.com/graphile/crystal/commit/1b3c76efd27df73eab3a5a1d221ce13de4cd6b1a), [`e10c372dafbe0d6014b1e946349b22f40aa87ef9`](https://github.com/graphile/crystal/commit/e10c372dafbe0d6014b1e946349b22f40aa87ef9), [`3c0a925f26f10cae627a23c49c75ccd8d76b60c8`](https://github.com/graphile/crystal/commit/3c0a925f26f10cae627a23c49c75ccd8d76b60c8), [`fcaeb48844156e258a037f420ea1505edb50c52a`](https://github.com/graphile/crystal/commit/fcaeb48844156e258a037f420ea1505edb50c52a), [`68926abc31c32ce527327ffbb1ede4b0b7be446b`](https://github.com/graphile/crystal/commit/68926abc31c32ce527327ffbb1ede4b0b7be446b), [`4b49dbd2df3b339a2ba3f1e9ff400fa1a125298b`](https://github.com/graphile/crystal/commit/4b49dbd2df3b339a2ba3f1e9ff400fa1a125298b), [`d7950e8e28ec6106a4ce2f7fe5e35d88b10eac48`](https://github.com/graphile/crystal/commit/d7950e8e28ec6106a4ce2f7fe5e35d88b10eac48), [`c8f1971ea4198633ec97f72f82abf65089f71a88`](https://github.com/graphile/crystal/commit/c8f1971ea4198633ec97f72f82abf65089f71a88), [`dd3d22eab73a8554715bf1111e30586251f69a88`](https://github.com/graphile/crystal/commit/dd3d22eab73a8554715bf1111e30586251f69a88), [`a120a8e43b24dfc174950cdbb69e481272a0b45e`](https://github.com/graphile/crystal/commit/a120a8e43b24dfc174950cdbb69e481272a0b45e), [`3b0f5082b2272997ce33ce8823a4752513d19e28`](https://github.com/graphile/crystal/commit/3b0f5082b2272997ce33ce8823a4752513d19e28), [`84f06eafa051e907a3050237ac6ee5aefb184652`](https://github.com/graphile/crystal/commit/84f06eafa051e907a3050237ac6ee5aefb184652), [`4a3aeaa77c8b8d2e39c1a9d05581d0c613b812cf`](https://github.com/graphile/crystal/commit/4a3aeaa77c8b8d2e39c1a9d05581d0c613b812cf), [`3789326b2e2fdb86519acc75e606c752ddefe590`](https://github.com/graphile/crystal/commit/3789326b2e2fdb86519acc75e606c752ddefe590), [`0fc2db95d90df918cf5c59ef85f22ac78d8000d3`](https://github.com/graphile/crystal/commit/0fc2db95d90df918cf5c59ef85f22ac78d8000d3), [`90e81a5deeae554a8be2dd55dcd01489860e96e6`](https://github.com/graphile/crystal/commit/90e81a5deeae554a8be2dd55dcd01489860e96e6), [`c59132eb7a93bc82493d2f1ca050db8aaea9f4d1`](https://github.com/graphile/crystal/commit/c59132eb7a93bc82493d2f1ca050db8aaea9f4d1), [`7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7`](https://github.com/graphile/crystal/commit/7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7), [`728888b28fcd2a6fc481e0ccdfe20d41181a091f`](https://github.com/graphile/crystal/commit/728888b28fcd2a6fc481e0ccdfe20d41181a091f), [`f4f39092d7a51517668384945895d3b450237cce`](https://github.com/graphile/crystal/commit/f4f39092d7a51517668384945895d3b450237cce), [`5cf3dc9d158891eaf324b2cd4f485d1d4bbb6b5e`](https://github.com/graphile/crystal/commit/5cf3dc9d158891eaf324b2cd4f485d1d4bbb6b5e), [`83d3b533e702cc875b46ba2ca02bf3642b421be8`](https://github.com/graphile/crystal/commit/83d3b533e702cc875b46ba2ca02bf3642b421be8), [`7001138c38e09822ad13db1018c62d2cac37941e`](https://github.com/graphile/crystal/commit/7001138c38e09822ad13db1018c62d2cac37941e), [`e9e7e33665e22ec397e9ead054d2e4aad3eadc8c`](https://github.com/graphile/crystal/commit/e9e7e33665e22ec397e9ead054d2e4aad3eadc8c), [`bb6ec8d834e3e630e28316196246f514114a2296`](https://github.com/graphile/crystal/commit/bb6ec8d834e3e630e28316196246f514114a2296), [`2b1918d053f590cdc534c8cb81f7e74e96c1bbe6`](https://github.com/graphile/crystal/commit/2b1918d053f590cdc534c8cb81f7e74e96c1bbe6), [`d1ecb39693a341f85762b27012ec4ea013857b0c`](https://github.com/graphile/crystal/commit/d1ecb39693a341f85762b27012ec4ea013857b0c), [`042ebafe11fcf7e2ecac9b131265a55dddd42a6d`](https://github.com/graphile/crystal/commit/042ebafe11fcf7e2ecac9b131265a55dddd42a6d), [`fa005eb0783c58a2476add984fbdd462e0e91dbe`](https://github.com/graphile/crystal/commit/fa005eb0783c58a2476add984fbdd462e0e91dbe), [`df0e5a0f968cf6f9ae97b68745a9a2f391324bf5`](https://github.com/graphile/crystal/commit/df0e5a0f968cf6f9ae97b68745a9a2f391324bf5), [`ef4cf75acd80e6b9c700c2b5a7ace899e565ef7f`](https://github.com/graphile/crystal/commit/ef4cf75acd80e6b9c700c2b5a7ace899e565ef7f), [`c041fd250372c57601188b65a6411c8f440afab6`](https://github.com/graphile/crystal/commit/c041fd250372c57601188b65a6411c8f440afab6), [`629b45aab49151810f6efc18ac18f7d735626433`](https://github.com/graphile/crystal/commit/629b45aab49151810f6efc18ac18f7d735626433), [`6d19724330d50d076aab9442660fa8abddd095cb`](https://github.com/graphile/crystal/commit/6d19724330d50d076aab9442660fa8abddd095cb), [`ca5bc1a834df7b894088fb8602a12f9fcff55b38`](https://github.com/graphile/crystal/commit/ca5bc1a834df7b894088fb8602a12f9fcff55b38), [`da6f3c04efe3d8634c0bc3fcf93ac2518de85322`](https://github.com/graphile/crystal/commit/da6f3c04efe3d8634c0bc3fcf93ac2518de85322), [`00d79e6f5608affc3f36bb0ce4ca2547230174e7`](https://github.com/graphile/crystal/commit/00d79e6f5608affc3f36bb0ce4ca2547230174e7), [`412b92a0b1e03ad962521f630b57a996d8620cf6`](https://github.com/graphile/crystal/commit/412b92a0b1e03ad962521f630b57a996d8620cf6), [`f0bc64b71914dfdd3612f4b65370401fd85b97bc`](https://github.com/graphile/crystal/commit/f0bc64b71914dfdd3612f4b65370401fd85b97bc)]: - grafast@0.1.1-beta.21 - pg-sql2@5.0.0-beta.8 - @dataplan/json@0.0.1-beta.30 - graphile-config@0.0.1-beta.15 ## 0.0.1-beta.31 ### Patch Changes - [#2365](https://github.com/graphile/crystal/pull/2365) [`fc9d64eb8`](https://github.com/graphile/crystal/commit/fc9d64eb8002d3b72625bc505ed76c07f4296d68) Thanks [@benjie](https://github.com/benjie)! - Internal inspect method used in bundles now correctly stringifies `undefined` - Updated dependencies [[`fc9d64eb8`](https://github.com/graphile/crystal/commit/fc9d64eb8002d3b72625bc505ed76c07f4296d68), [`a2dbad945`](https://github.com/graphile/crystal/commit/a2dbad9457195bec797d72e4e6d45f45278f9f69), [`31078842a`](https://github.com/graphile/crystal/commit/31078842ad0eeaa7111491fa9eb5e3bd026fb38a), [`5a0ec31de`](https://github.com/graphile/crystal/commit/5a0ec31deae91f1dd17a77a4bb7c1a911a27e26a)]: - grafast@0.1.1-beta.20 - @dataplan/json@0.0.1-beta.29 ## 0.0.1-beta.30 ### Patch Changes - Updated dependencies [[`83c546509`](https://github.com/graphile/crystal/commit/83c546509d24be2955a56120981363ad3c3a5f3f)]: - graphile-config@0.0.1-beta.14 - grafast@0.1.1-beta.19 - @dataplan/json@0.0.1-beta.28 ## 0.0.1-beta.29 ### Patch Changes - [#2279](https://github.com/graphile/crystal/pull/2279) [`b336a5829`](https://github.com/graphile/crystal/commit/b336a58291cfec7aef884d3843172d408abfaf3c) Thanks [@benjie](https://github.com/benjie)! - Introduce step caching to reduce deduplication workload safely, thereby reducing planning time for many larger queries. - Updated dependencies [[`7580bc16a`](https://github.com/graphile/crystal/commit/7580bc16a050fd8d916c6dabe9d1ded980090349), [`b336a5829`](https://github.com/graphile/crystal/commit/b336a58291cfec7aef884d3843172d408abfaf3c)]: - graphile-config@0.0.1-beta.13 - grafast@0.1.1-beta.18 - @dataplan/json@0.0.1-beta.27 ## 0.0.1-beta.28 ### Patch Changes - [#2257](https://github.com/graphile/crystal/pull/2257) [`2a37fb99a`](https://github.com/graphile/crystal/commit/2a37fb99a04784647dff6ab8c5bfffb072cc6e8a) Thanks [@benjie](https://github.com/benjie)! - Overhaul how PostgreSQL arrays are handled, and fix the "empty arrays become null" bug caused by using `array_agg()`. - [#2265](https://github.com/graphile/crystal/pull/2265) [`5d9f2de85`](https://github.com/graphile/crystal/commit/5d9f2de8519b216732b17464d0b326ec8d7c58de) Thanks [@benjie](https://github.com/benjie)! - Prevents inlining (via joins) child PgSelect queries into parents when the parent is relying on implicit ordering coming from a function or suitably flagged subquery. - [#2258](https://github.com/graphile/crystal/pull/2258) [`cba6ee06d`](https://github.com/graphile/crystal/commit/cba6ee06d38ec5ae4ef4dafa58569fad61f239ac) Thanks [@kzlar](https://github.com/kzlar)! - Fixes incorrect deduplication in pgSelect resulting from lack of `from` comparison when passing custom `from` to custom `pgSelect()` calls. - Updated dependencies [[`69ab227b5`](https://github.com/graphile/crystal/commit/69ab227b5e1c057a6fc8ebba87bde80d5aa7f3c8), [`d13b76f0f`](https://github.com/graphile/crystal/commit/d13b76f0fef2a58466ecb44880af62d25910e83e), [`b167bd849`](https://github.com/graphile/crystal/commit/b167bd8499be5866b71bac6594d55bd768fda1d0), [`7bf045282`](https://github.com/graphile/crystal/commit/7bf04528264c3b9c509f148253fed96d3394141d), [`6a13ecbd4`](https://github.com/graphile/crystal/commit/6a13ecbd45534c39c846c1d8bc58242108426dd1)]: - grafast@0.1.1-beta.17 - graphile-config@0.0.1-beta.12 - pg-sql2@5.0.0-beta.7 - @dataplan/json@0.0.1-beta.26 ## 0.0.1-beta.27 ### Patch Changes - Updated dependencies [[`5626c7d36`](https://github.com/graphile/crystal/commit/5626c7d3649285e11fe9857dfa319d2883d027eb), [`76c7340b7`](https://github.com/graphile/crystal/commit/76c7340b74d257c454beec883384d19ef078b21e)]: - graphile-config@0.0.1-beta.11 - grafast@0.1.1-beta.16 - @dataplan/json@0.0.1-beta.25 ## 0.0.1-beta.26 ### Patch Changes - [#2156](https://github.com/graphile/crystal/pull/2156) [`6fdc6cad8`](https://github.com/graphile/crystal/commit/6fdc6cad8f8d1230202df533d05cc2bd80538f09) Thanks [@benjie](https://github.com/benjie)! - Added `pgRegistry.pgExecutors` so executors don't need to be looked up from a resource (this causes confusion) - instead they can be referenced directly. By default there's one executor called `main`, i.e. `build.input.pgRegistry.pgExecutors.main`. - [#2193](https://github.com/graphile/crystal/pull/2193) [`42b982463`](https://github.com/graphile/crystal/commit/42b9824637a6c05e02935f2b05b5e8e0c61965a6) Thanks [@benjie](https://github.com/benjie)! - Add support for stable deduplication of object/list arguments to loadOne/loadMany, reducing redundant fetches. - [#2191](https://github.com/graphile/crystal/pull/2191) [`1eac03ec2`](https://github.com/graphile/crystal/commit/1eac03ec2e9da65c64b7754c04292f43da82c40b) Thanks [@benjie](https://github.com/benjie)! - Broaden types around `pgSelectSingleFromRecord` - [#2151](https://github.com/graphile/crystal/pull/2151) [`e8a9fd424`](https://github.com/graphile/crystal/commit/e8a9fd4243981b892364148eca1df66620ddeb87) Thanks [@benjie](https://github.com/benjie)! - Fix bug preventing using certain steps as input to `resource.find({...})` and `resource.get({...})`. - [#2157](https://github.com/graphile/crystal/pull/2157) [`50f6ce456`](https://github.com/graphile/crystal/commit/50f6ce456de3edd084869b54ee9f2eaf51a7fa0c) Thanks [@benjie](https://github.com/benjie)! - 🚨 PostGraphile now ignores unlogged database tables by default. - Updated dependencies [[`d5834def1`](https://github.com/graphile/crystal/commit/d5834def1fb84f3e2c0c0a6f146f8249a6df890a), [`42b982463`](https://github.com/graphile/crystal/commit/42b9824637a6c05e02935f2b05b5e8e0c61965a6), [`884a4b429`](https://github.com/graphile/crystal/commit/884a4b4297af90fdadaf73addd524f1fbbcfdcce), [`38835313a`](https://github.com/graphile/crystal/commit/38835313ad93445206dccdd4cf07b90c5a6e4377), [`cc0941731`](https://github.com/graphile/crystal/commit/cc0941731a1679bc04ce7b7fd4254009bb5f1f62), [`b0865d169`](https://github.com/graphile/crystal/commit/b0865d1691105b5419009954c98c8109a27a5d81), [`8b472cd51`](https://github.com/graphile/crystal/commit/8b472cd51cd66d8227f9f2722d09c0a774792b0f), [`9cd9bb522`](https://github.com/graphile/crystal/commit/9cd9bb5222a9f0398ee4b8bfa4f741b6de2a2192)]: - grafast@0.1.1-beta.15 - graphile-config@0.0.1-beta.10 - @dataplan/json@0.0.1-beta.24 ## 0.0.1-beta.25 ### Patch Changes - [#2150](https://github.com/graphile/crystal/pull/2150) [`82ce02cd9`](https://github.com/graphile/crystal/commit/82ce02cd93df3df3c9570c3528483c4f720ff9bb) Thanks [@benjie](https://github.com/benjie)! - Fix bug selecting single row via pgUnionAll where no rows were selected. - [#2146](https://github.com/graphile/crystal/pull/2146) [`eca7e62e2`](https://github.com/graphile/crystal/commit/eca7e62e2a09af77f4f166a281dab81d009d9ec1) Thanks [@benjie](https://github.com/benjie)! - Fix bug causing out of date information to be displayed via subscriptions - Updated dependencies [[`871d32b2a`](https://github.com/graphile/crystal/commit/871d32b2a18df0d257880fc54a61d9e68c4607d6), [`a26e3a30c`](https://github.com/graphile/crystal/commit/a26e3a30c02f963f8f5e9c9d021e871f33689e1b), [`02c11a4d4`](https://github.com/graphile/crystal/commit/02c11a4d42bf434dffc9354b300e8d791c4eeb2d)]: - grafast@0.1.1-beta.14 - @dataplan/json@0.0.1-beta.23 ## 0.0.1-beta.24 ### Patch Changes - [#2132](https://github.com/graphile/crystal/pull/2132) [`807650035`](https://github.com/graphile/crystal/commit/8076500354a3e2bc2de1b6c4e947bd710cc5bddc) Thanks [@benjie](https://github.com/benjie)! - Fix issue where planning errors occurring after side-effects would result in GrafastInternalError being thrown. Further, fix issue causing `$step.hasSideEffects=true` to throw a planning error if `$step` had created other steps (as dependencies) during its construction. (Notably, `withPgClient` suffered from this.) Thanks to @purge for reporting the issue and creating a reproduction. - Updated dependencies [[`807650035`](https://github.com/graphile/crystal/commit/8076500354a3e2bc2de1b6c4e947bd710cc5bddc)]: - grafast@0.1.1-beta.13 - @dataplan/json@0.0.1-beta.22 ## 0.0.1-beta.23 ### Patch Changes - [#2121](https://github.com/graphile/crystal/pull/2121) [`8bdc553b7`](https://github.com/graphile/crystal/commit/8bdc553b79aae21a27d22a4e1f1e57ee2e5d1d3f) Thanks [@benjie](https://github.com/benjie)! - Add support for accepting poolConfig via makePgService - [#2128](https://github.com/graphile/crystal/pull/2128) [`4e102b1a1`](https://github.com/graphile/crystal/commit/4e102b1a1cd232e6f6703df0706415f01831dab2) Thanks [@adamni21](https://github.com/adamni21)! - Reduce planning cost of large input object trees by evaluating keys up front (thanks to @adamni21). - [#2121](https://github.com/graphile/crystal/pull/2121) [`1cabbd311`](https://github.com/graphile/crystal/commit/1cabbd311bdefd7ce78f8dacbf61a42237a6c73c) Thanks [@benjie](https://github.com/benjie)! - Superuser connection now uses `superuserPoolConfig` rather than `poolConfig` when creating a pool. - [#2091](https://github.com/graphile/crystal/pull/2091) [`590b6fdf5`](https://github.com/graphile/crystal/commit/590b6fdf5d04a392c4cc9e8bdad83278377c547b) Thanks [@benjie](https://github.com/benjie)! - Allow `PgClassExpressionStep` instances to be embedded directly into SQL expressions. - [#1985](https://github.com/graphile/crystal/pull/1985) [`d6102714e`](https://github.com/graphile/crystal/commit/d6102714e4fec35952784c988c1617c789eee0cd) Thanks [@hannesj](https://github.com/hannesj)! - 🚨 PostgreSQL adaptor is no longer loaded via string value; instead you must pass the adaptor instance directly. If you have `adaptor: "@dataplan/pg/adaptors/pg"` then replace it with `adaptor: await import("@dataplan/pg/adaptors/pg")`. (This shouldn't cause you issues because you _should_ be using `makePgService` to construct your `pgServices` rather than building raw objects.) 🚨 If you've implemented a custom PgAdaptor, talk to Benjie about how to port it. (Should be straightforward, but no point me figuring it out if no-one has done it yet 🤷) This change improves bundle-ability by reducing the number of dynamic imports. Also: `PgAdaptorOptions` has been renamed to `PgAdaptorSettings`, so please do a global find and replace for that. - [#2120](https://github.com/graphile/crystal/pull/2120) [`925123497`](https://github.com/graphile/crystal/commit/925123497cf17b5e145ab80f62fa9de768a977ae) Thanks [@benjie](https://github.com/benjie)! - Internal refactoring of pg adaptor. - [#2119](https://github.com/graphile/crystal/pull/2119) [`aa0474755`](https://github.com/graphile/crystal/commit/aa0474755142a758fc58c5c1a30b8c754bc84e7c) Thanks [@benjie](https://github.com/benjie)! - Reflect in types that `pgSettings` object keys may be undefined. - Updated dependencies [[`1bd50b61e`](https://github.com/graphile/crystal/commit/1bd50b61ebb10b7d09b3612c2e2767c41cca3b78), [`4e102b1a1`](https://github.com/graphile/crystal/commit/4e102b1a1cd232e6f6703df0706415f01831dab2), [`7bb1573ba`](https://github.com/graphile/crystal/commit/7bb1573ba45a4d8b7fa9ad53cdd79686d2641383), [`18addb385`](https://github.com/graphile/crystal/commit/18addb3852525aa91019a36d58fa2fecd8b5b443), [`6ed615e55`](https://github.com/graphile/crystal/commit/6ed615e557b2ab1fb57f1e68c06730a8e3da7175), [`b25cc539c`](https://github.com/graphile/crystal/commit/b25cc539c00aeda7a943c37509aaae4dc7812317), [`867f33136`](https://github.com/graphile/crystal/commit/867f331365346fc46ed1e0d23c79719846e398f4), [`cf535c210`](https://github.com/graphile/crystal/commit/cf535c21078da06c14dd12f30e9b4378da4ded03), [`acf99b190`](https://github.com/graphile/crystal/commit/acf99b190954e3c5926e820daed68dfe8eb3ee1f), [`4967a197f`](https://github.com/graphile/crystal/commit/4967a197fd2c71ee2a581fe29470ee9f30e74de5), [`1908e1ba1`](https://github.com/graphile/crystal/commit/1908e1ba11883a34dac66f985fc20ab160e572b1), [`084d80be6`](https://github.com/graphile/crystal/commit/084d80be6e17187c9a9932bcf079e3f460368782)]: - grafast@0.1.1-beta.12 - @dataplan/json@0.0.1-beta.21 ## 0.0.1-beta.22 ### Patch Changes - [#2071](https://github.com/graphile/crystal/pull/2071) [`582bd768f`](https://github.com/graphile/crystal/commit/582bd768fec403ce3284f293b85b9fd86e4d3f40) Thanks [@benjie](https://github.com/benjie)! - `GrafastExecutionArgs` now accepts `resolvedPreset` and `requestContext` directly; passing these through additional arguments is now deprecated and support will be removed in a future revision. This affects: - `grafast()` - `execute()` - `subscribe()` - `hookArgs()` `graphile-config` has gained a middleware system which is more powerful than it's AsyncHooks system. Old hooks can be emulated through the middleware system safely since middleware is a superset of hooks' capabilities. `applyHooks` has been renamed to `orderedApply` (because it applies to more than just hooks), calling `applyHooks` will still work but is deprecated. 🚨 `grafast` no longer automatically reads your `graphile.config.ts` or similar; you must do that yourself and pass the `resolvedPreset` to grafast via the `args`. This is to aid in bundling of grafast since it should not need to read from filesystem or dynamically load modules. `grafast` no longer outputs performance warning when you set `GRAPHILE_ENV=development`. 🚨 `plugin.grafast.hooks.args` is now `plugin.grafast.middleware.prepareArgs`, and the signature has changed - you must be sure to call the `next()` function and ctx/resolvedPreset can be extracted directly from `args`: ```diff const plugin = { grafast: { - hooks: { + middleware: { - args({ args, ctx, resolvedPreset }) { + prepareArgs(next, { args }) { + const { requestContext: ctx, resolvedPreset } = args; // ... + return next(); } } } } ``` Many more middleware have been added; use TypeScript's autocomplete to see what's available until we have proper documentation for them. `plugin.grafserv.hooks.*` are still supported but deprecated; instead use middleware `plugin.grafserv.middleware.*` (note that call signatures have changed slightly, similar to the diff above): - `hooks.init` -> `middleware.setPreset` - `hooks.processGraphQLRequestBody` -> `middleware.processGraphQLRequestBody` - `hooks.ruruHTMLParts` -> `middleware.ruruHTMLParts` A few TypeScript types related to Hooks have been renamed, but their old names are still available, just deprecated. They will be removed in a future update: - `HookObject` -> `FunctionalityObject` - `PluginHook` -> `CallbackOrDescriptor` - `PluginHookObject` -> `CallbackDescriptor` - `PluginHookCallback` -> `UnwrapCallback` - Updated dependencies [[`582bd768f`](https://github.com/graphile/crystal/commit/582bd768fec403ce3284f293b85b9fd86e4d3f40)]: - graphile-config@0.0.1-beta.9 - grafast@0.1.1-beta.11 - @dataplan/json@0.0.1-beta.20 ## 0.0.1-beta.21 ### Patch Changes - Updated dependencies [[`3c161f7e1`](https://github.com/graphile/crystal/commit/3c161f7e13375105b1035a7d5d1c0f2b507ca5c7), [`a674a9923`](https://github.com/graphile/crystal/commit/a674a9923bc908c9315afa40e0cb256ee0953d16), [`b7cfeffd1`](https://github.com/graphile/crystal/commit/b7cfeffd1019d61c713a5054c4f5929960a2a6ab)]: - grafast@0.1.1-beta.10 - @dataplan/json@0.0.1-beta.19 ## 0.0.1-beta.20 ### Patch Changes - Updated dependencies [[`437570f97`](https://github.com/graphile/crystal/commit/437570f97e8520afaf3d0d0b5