- Updated dependencies
[
83c546509
]:
- #2279
b336a5829
Thanks @benjie! - Introduce step caching to reduce deduplication workload safely, thereby reducing planning time for many larger queries. - Updated dependencies
[
7580bc16a
,b336a5829
]:
-
#2257
2a37fb99a
Thanks @benjie! - Overhaul how PostgreSQL arrays are handled, and fix the "empty arrays become null" bug caused by usingarray_agg()
. -
#2265
5d9f2de85
Thanks @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
cba6ee06d
Thanks @kzlar! - Fixes incorrect deduplication in pgSelect resulting from lack offrom
comparison when passing customfrom
to custompgSelect()
calls. -
Updated dependencies [
69ab227b5
,d13b76f0f
,b167bd849
,7bf045282
,6a13ecbd4
]:
-
#2156
6fdc6cad8
Thanks @benjie! - AddedpgRegistry.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 calledmain
, i.e.build.input.pgRegistry.pgExecutors.main
. -
#2193
42b982463
Thanks @benjie! - Add support for stable deduplication of object/list arguments to loadOne/loadMany, reducing redundant fetches. -
#2191
1eac03ec2
Thanks @benjie! - Broaden types aroundpgSelectSingleFromRecord
-
#2151
e8a9fd424
Thanks @benjie! - Fix bug preventing using certain steps as input toresource.find({...})
andresource.get({...})
. -
#2157
50f6ce456
Thanks @benjie! - 🚨 PostGraphile now ignores unlogged database tables by default. -
Updated dependencies [
d5834def1
,42b982463
,884a4b429
,38835313a
,cc0941731
,b0865d169
,8b472cd51
,9cd9bb522
]:
-
#2150
82ce02cd9
Thanks @benjie! - Fix bug selecting single row via pgUnionAll where no rows were selected. -
#2146
eca7e62e2
Thanks @benjie! - Fix bug causing out of date information to be displayed via subscriptions -
Updated dependencies [
871d32b2a
,a26e3a30c
,02c11a4d4
]:- [email protected]
- @dataplan/[email protected]
- #2132
807650035
Thanks @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
]:- [email protected]
- @dataplan/[email protected]
-
#2121
8bdc553b7
Thanks @benjie! - Add support for accepting poolConfig via makePgService -
#2128
4e102b1a1
Thanks @adamni21! - Reduce planning cost of large input object trees by evaluating keys up front (thanks to @adamni21). -
#2121
1cabbd311
Thanks @benjie! - Superuser connection now usessuperuserPoolConfig
rather thanpoolConfig
when creating a pool. -
#2091
590b6fdf5
Thanks @benjie! - AllowPgClassExpressionStep
instances to be embedded directly into SQL expressions. -
#1985
d6102714e
Thanks @hannesj! - 🚨 PostgreSQL adaptor is no longer loaded via string value; instead you must pass the adaptor instance directly. If you haveadaptor: "@dataplan/pg/adaptors/pg"
then replace it withadaptor: await import("@dataplan/pg/adaptors/pg")
. (This shouldn't cause you issues because you should be usingmakePgService
to construct yourpgServices
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 toPgAdaptorSettings
, so please do a global find and replace for that. -
#2120
925123497
Thanks @benjie! - Internal refactoring of pg adaptor. -
#2119
aa0474755
Thanks @benjie! - Reflect in types thatpgSettings
object keys may be undefined. -
Updated dependencies [
1bd50b61e
,4e102b1a1
,7bb1573ba
,18addb385
,6ed615e55
,b25cc539c
,867f33136
,cf535c210
,acf99b190
,4967a197f
,1908e1ba1
,084d80be6
]:- [email protected]
- @dataplan/[email protected]
-
#2071
582bd768f
Thanks @benjie! -GrafastExecutionArgs
now acceptsresolvedPreset
andrequestContext
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 toorderedApply
(because it applies to more than just hooks), callingapplyHooks
will still work but is deprecated.🚨
grafast
no longer automatically reads yourgraphile.config.ts
or similar; you must do that yourself and pass theresolvedPreset
to grafast via theargs
. 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 setGRAPHILE_ENV=development
.🚨
plugin.grafast.hooks.args
is nowplugin.grafast.middleware.prepareArgs
, and the signature has changed - you must be sure to call thenext()
function and ctx/resolvedPreset can be extracted directly fromargs
: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 middlewareplugin.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
]:
- Updated dependencies
[
3c161f7e1
,a674a9923
,b7cfeffd1
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
437570f97
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
bd5a908a4
]:- [email protected]
- @dataplan/[email protected]
-
#1980
357d475f5
Thanks @benjie! - The signature ofExecutableStep.execute
has changed; please make the following change to each of your custom step classes'execute
methods:- async execute(count: number, values: any[][], extra: ExecutionExtra) { + async execute({ count, values: newValues, extra }: ExecutionDetails) { + const values = newValues.map((dep) => + dep.isBatch ? dep.entries : new Array(count).fill(dep.value) + ); // REST OF YOUR FUNCTION HERE }
For more details, see: https://err.red/gev2
-
#2039
30bcd6c12
Thanks @benjie! - Exposes PgSelectPlan.clone, no longer internal. -
#1994
ab08cbf9c
Thanks @benjie! - Introduceinterface SQLable {[$toSQL](): SQL}
topg-sql2
and use it to simplify SQL fragments in various places. -
#1982
86168b740
Thanks @benjie! - Fix authorization check so it can call other steps (e.g. reading fromcontext()
) -
#1995
e0d69e518
Thanks @benjie! - Refactoring of unary logic. -
#1973
a0e82b9c5
Thanks @benjie! - Add 'unary steps' concept to codebase and refactor to using new executeV2 execution method which leverages them. Backwards compatibility maintained, but users should move to executeV2. -
#1989
c48d3da7f
Thanks @benjie! - Make it so that more pgSelect queries optimize themselves into parent queries via new step.canAddDependency helper. -
#2019
51a94417f
Thanks @benjie! - Now possible to filter by relay node identifiers without weird results if you pass an incompatible node id (e.g. a 'Post' ID where a 'User' ID was expected) - significantly improves the Relay preset. -
#1988
81d17460c
Thanks @benjie! - Fix issue with record types when attributes need to be cast; this previously caused errors with computed columns when passed particular arguments. -
Updated dependencies [
357d475f5
,3551725e7
,80836471e
,a5c20fefb
,1ce08980e
,ab08cbf9c
,dff4f2535
,a287a57c2
,2fe56f9a6
,fed603d71
,ed6e0d278
,e82e4911e
,94a05064e
,42ece5aa6
,e0d69e518
,db8ceed0f
,6699388ec
,966203504
,c1645b249
,ed8bbaa3c
,a0e82b9c5
,14e2412ee
,57ab0e1e7
,8442242e4
,64ce7b765
,cba842357
,2fa77d0f2
]:
-
#1945
9f85c614d
Thanks @benjie! - MarkExecutableStep::getDep
asprotected
to avoid abuse. -
#1955
6c6be29f1
Thanks @benjie! - Steps are now prevented from calling other steps' lifecycle methods. GRAPHILE_ENV is actively encouraged, and falls back to NODE_ENV. -
#1944
6c80c44b7
Thanks @benjie! - Fix accidental double-encoding of values on their way to postgres. -
#1958
8315e8d01
Thanks @benjie! - EXPORTABLE now accepts a third argument,nameHint
, which is used to hint what variable name to use for the given value. Used this ingraphile-export
along with some fixes and optimizations to improve the exports further. -
Updated dependencies [
9f85c614d
,6c6be29f1
,8315e8d01
]:- [email protected]
- @dataplan/[email protected]
- #1924
ef44c29b2
Thanks @benjie! - 🚨 TypeScript is now configured to hide interfaces marked as@internal
. This may result in a few errors where you're accessing things you oughtn't be, but also may hide some interfaces that should be exposed - please file an issue if an API you were dependent on has been removed from the TypeScript typings. If that API happens to bestep.dependencies
; you should first read this: https://benjie.dev/graphql/ancestors - Updated dependencies
[
63dd7ea99
,d801c9778
,ef44c29b2
,5de3e86eb
]:
-
#1895
555a2be03
Thanks @enisdenjo! - Fix issue with aggregates for polymorphic connections. -
Updated dependencies [
a2176ea32
,886833e2e
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
0df5511ac
]:
-
#1817
f305c3278
Thanks @benjie! - Add support for limiting polymorphic plans (only some of them, specificallypgUnionAll()
right now) to limit the types of their results; exposed via an experimental 'only' argument on fields, for exampleallApplications(only: [GcpApplication, AwsApplication])
would limit the type of applications returned to only be the two specified. -
#1877
8a0cdb95f
Thanks @benjie! - Move 'declare global' out of 'interfaces.ts' and into 'index.ts' or equivalent. Should make TypeScript more aware of these types. -
#1879
dbd91fdd8
Thanks @benjie! - Move PgContextPlugin from graphile-build-pg into @dataplan/pg so it can be used after schema export without needing dependency on graphile-build-pg -
#1884
c66c3527c
Thanks @benjie! - List codecs can now have names. -
Updated dependencies [
3fdc2bce4
,aeef362b5
,8a76db07f
,8a0cdb95f
,1c9f1c0ed
]:
- Updated dependencies
[
2805edc68
]:
-
#1778
b2bce88da
Thanks @benjie! - Enable source maps in modules where it was disabled. -
#1770
9a84bc6dd
Thanks @benjie! - Fix issues around enum tables: indicate when an enum table codec replaces a regular attribute codec, expose helpers for working with enum tables, and don't exclude enum table references when using the Relay preset. -
Updated dependencies [
4a4d26d87
,b2bce88da
,861a8a306
]:- [email protected]
- @dataplan/[email protected]
-
#514
c9848f693
Thanks @benjie! - Update package.json repository information -
Updated dependencies [
c9848f693
,ede1092fe
,566983fbd
,409bf6071
]:- @dataplan/[email protected]
- [email protected]
- [email protected]
- [email protected]
- @graphile/[email protected]
- Updated dependencies
[
3700e204f
]:- [email protected]
- @dataplan/[email protected]
-
#496
c9bfd9892
Thanks @benjie! - Update dependencies (sometimes through major versions). -
Updated dependencies [
c9bfd9892
,e613b476d
]:- @dataplan/[email protected]
- [email protected]
- [email protected]
- [email protected]
- @graphile/[email protected]
-
#488
95e902f54
Thanks @benjie! - Don't try and inline a query when it includes an inner join (unsafe). -
Updated dependencies [
53186213a
]:- [email protected]
- @dataplan/[email protected]
-
#462
53f0488b1
Thanks @benjie! - Allow 'null' to be passed towithPgClient
/withPgClientTransaction
-
#464
00d026409
Thanks @benjie! -@dataplan/pg/adaptors/pg
now addsrawClient
property which is the underlying Postgres client for use withpgTyped
,zapatos
, and other libraries that can use a raw postgres client. This is exposed viaNodePostgresPgClient
interface which is a subtype ofPgClient
. -
Updated dependencies [
f9cc88dc4
]:- [email protected]
- @dataplan/[email protected]
-
#452
d3ab4e12d
Thanks @benjie! - Improve error messages with links to more details. -
Updated dependencies [
46cd08aa1
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
23bd3c291
]:- [email protected]
- @dataplan/[email protected]
-
Updated dependencies [
cbd987385
]:- @dataplan/[email protected]
- [email protected]
- [email protected]
- @graphile/[email protected]
- [email protected]
-
#441
dfefdad3c
Thanks @benjie! - Change bundling techniques for grafast and @dataplan/pg -
Updated dependencies [
dfefdad3c
]:- [email protected]
- @dataplan/[email protected]
-
#435
cf32f0397
Thanks @benjie! - Fix bug in listOfCodec causing wrong extensions to be used in non-deterministic manner (thanks to @jvandermey for finding the bug and helping to track it down). -
#422
9f87a26b1
Thanks @benjie! - Comments enabled in released packages -
Updated dependencies [
ea003ca3a
,57d88b5fa
,a22830b2f
,9f87a26b1
]:
- Updated dependencies
[
d99d666fb
]:- [email protected]
- @dataplan/[email protected]
-
#417
881672305
Thanks @benjie! -deepEval
has been renamed toapplyTransforms
-
#418
9ab2adba2
Thanks @benjie! - Overhaul peerDependencies and dependencies to try and eliminate duplicate modules error. -
Updated dependencies [
620f9e07e
,1882e0185
,881672305
,e5012f9a1
,9ab2adba2
,47f6f018b
,ff4395bfc
,502b23340
]:- [email protected]
- @dataplan/[email protected]
-
#407
9281a2d88
Thanks @benjie! - Exportedversion
no longer usesrequire('../package.json')
hack, instead the version number is written to a source file at versioning time. Packages now exportversion
. -
#408
675b7abb9
Thanks @benjie! -inspect()
fallback function updated -
#406
51414d328
Thanks @benjie! - Add support forbytea
datatype using newBase64EncodedBinary
scalar in GraphQL. -
#408
bc14d488d
Thanks @benjie! - When sorting, specify a concrete locale to localeCompare to ensure stable ordering across machines. -
Updated dependencies [
9281a2d88
,675b7abb9
,c5050dd28
,0d1782869
]:
- Updated dependencies
[
644938276
]:
-
#396
659508371
Thanks @benjie! - List and range codecs now use the underlying codec to parse values from Postgres. -
#399
409581534
Thanks @benjie! - Change many of the dependencies to be instead (or also) peerDependencies, to avoid duplicate modules. -
#372
4d64ac127
Thanks @benjie! - Remove pgSelectSingle.expression; use the equivalent method pgSelectSingle.select instead. -
#396
17fe531d7
Thanks @benjie! - pgUnionAll uses a slightly more optimal SQL (where JSON isn't cast to::text
and then back to::json
) -
#398
b7533bd4d
Thanks @benjie! - Incremental delivery will no longer deliver payloads for paths that don't exist when an error is thrown in an output plan. -
#396
56b52295c
Thanks @benjie! - pgUnionAll can now specify a name, making the SQL and query plan easier to read. -
#396
b5eb7c490
Thanks @benjie! - Cursor pagination over nullable columns should now work, although it is untested. -
#396
7573bf374
Thanks @benjie! - Address a decent number of TODO/FIXME/etc comments in the codebase. -
#378
95b2ab41e
Thanks @benjie! - Support for nested arrays via PostgreSQL domains. -
#398
c43802d74
Thanks @benjie! - Fix a number of issues relating to incremental delivery and iterators -
#398
b118b8f6d
Thanks @benjie! - Incremental delivery@stream
now works for regular steps as well as streamable steps. -
#396
b66d2503b
Thanks @benjie! - hasNextPage (via hasMore) now uses an access plan rather than a lambda plan. -
#396
3caaced6c
Thanks @benjie! - When fetching a single row, anORDER BY
clause will no longer be added. -
#396
9f2507ed9
Thanks @benjie! - Codecs can now (optionally) have executors associated (typically useful for record codecs); so we've eradicated runtime resource definition for columns that use composite types (or lists thereof) - all composite types accessible from attributes are now guaranteed to have a table-like resource generated in the registry. -
Updated dependencies [
409581534
,b7533bd4d
,9feb769c2
,7573bf374
,2c8586b36
,c43802d74
,b118b8f6d
,9008c4f87
,e8c81cd20
]:- [email protected]
- @dataplan/[email protected]
-
#362
77e011294
Thanks @benjie! - Forbid duplicate codec/resource names. -
#362
e443db39b
Thanks @benjie! - Use original case for table resource names. -
Updated dependencies [
339fe20d0
,56237691b
,ed1982f31
,1fe47a2b0
,198ac74d5
,6878c589c
,2ac706f18
]:
- Updated dependencies
[
dd3ef599c
]:- [email protected]
- @dataplan/[email protected]
-
#341
2fcbe688c
Thanks @benjie! - Ensure interfaces with zero implementations don't cause a crash. -
#345
3a984718a
Thanks @benjie! - Cursor validation errors are now raised by the connection directly, rather than the subfields. -
#340
fe9154b23
Thanks @benjie! - Make Datetime RFC3339 compatible when a timezone is present -
Updated dependencies [
5c9d32264
,2fcbe688c
,3a984718a
,adc7ae5e0
]:
-
#338
ca1526b70
Thanks @benjie! - Fix startCursor/endCursor for connections using pgUnionAll steps. -
#338
3426b0f4a
Thanks @benjie! - Fix bugs in pgUnionAll connections relating to PageInfo -
Updated dependencies [
f75926f4b
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
86e503d78
,24822d0dc
]:- [email protected]
- @dataplan/[email protected]
-
Updated dependencies [
45dcf3a8f
]:- [email protected]
- @dataplan/[email protected]
-
7f857950a
Thanks @benjie! - Upgrade to the latest TypeScript/tslib -
Updated dependencies [
98ae00f59
,2389f47ec
,82cc01152
,e91ee201d
,865bec590
,7f857950a
,d39a5d409
]:- @graphile/[email protected]
- [email protected]
- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
3df3f1726
]:- [email protected]
- @dataplan/[email protected]
-
759ad403d
Thanks @benjie! - Alpha release - see https://postgraphile.org/news/2023-04-26-version-5-alpha -
Updated dependencies [
759ad403d
]:- @dataplan/[email protected]
- [email protected]
- @graphile/[email protected]
- [email protected]
- Updated dependencies
[
8d270ead3
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
7dcb0e008
]:- [email protected]
- @dataplan/[email protected]
-
#279
2df36c5a1
Thanks @benjie! -description
moved out ofextensions
to live directly on all the relevant entities. -
#279
a73f9c709
Thanks @benjie! -PgConnectionArgFirstLastBeforeAfterPlugin
is nowPgFirstLastBeforeAfterArgsPlugin
(because it applies to lists as well as connections).PgInsertStep
/pgInsert()
/PgUpdateStep
/pgUpdate()
/PgDeleteStep
/pgDelete()
are nowPgInsertSingleStep
/pgInsertSingle()
/PgUpdateSingleStep
/pgUpdateSingle()
/PgDeleteSingleStep
/pgDeleteSingle()
(to make space to add a future bulk API if we want to).config.schema.orderByNullsLast
is nowconfig.schema.pgOrderByNullsLast
for consistency (V4 preset users are unaffected). Lots of field scopes ingraphile-build-pg
have been updated to incorporatefield
into their names. -
#270
ef42d717c
Thanks @benjie! - SQL is now generated in a slightly different way, helping PostgreSQL to optimize queries that have a batch size of 1. Also removes internal mapping code as we now simply append placeholder values rather than search and replacing a symbol (eradicatesqueryValuesSymbol
and related hacks). If you manually issue queries throughPgExecutor
(extremely unlikely!) then you'll want to check out PR #270 to see the differences. -
#260
d5312e6b9
Thanks @benjie! - TypeScript v5 is now required -
#265
22ec50e36
Thanks @benjie! - 'extensions.graphile' is now 'extensions.grafast' -
#259
c22dcde7b
Thanks @benjie! - RenamedrecordType
codec factory torecordCodec
.recordCodec()
now only accepts a single object argument. RenamedenumType
codec factory toenumCodec
.enumCodec()
now only accepts a single object argument. RenamelistOfType
tolistOfCodec
.Massive overhaul of PgTypeCodec, PgTypeColumn and PgTypeColumns generics - types should be passed through much deeper now, but if you reference any of these types directly you'll need to update your code.
-
#285
bd37be707
Thanks @benjie! - Single table inheritance no longer exposes non-shared columns via condition/order, and also only exposes the relationships on the types where they are appropriate. -
#270
f8954fb17
Thanks @benjie! -EXPLAIN ANALYZE
(forSELECT
) andEXPLAIN
(for other operations) support added. Currently requiresDEBUG="datasource:pg:PgExecutor:explain"
to be set. Publish this through all the way to Ruru. -
#260
96b0bd14e
Thanks @benjie! -PgSource
has been renamed toPgResource
,PgTypeCodec
toPgCodec
,PgEnumTypeCodec
toPgEnumCodec
,PgTypeColumn
toPgCodecAttribute
(and similar for related types/interfaces).source
has been replaced byresource
in various of the APIs where it relates to aPgResource
.PgSourceBuilder
is no more, instead being replaced withPgResourceOptions
and being built into the finalPgResource
via the newmakeRegistryBuilder
/makeRegistry
functions.build.input
no longer contains thepgSources
directly, insteadbuild.input.pgRegistry.pgResources
should be used.The new registry system also means that various of the hooks in the gather phase have been renamed/replaced, there's a new
PgRegistryPlugin
plugin in the default preset. The only plugin that uses themain
method in thegather
phase is nowPgRegistryPlugin
- if you are using themain
function for Postgres-related behaviors you should consider moving your logic to hooks instead.Plugin ordering has changed and thus the shape of the final schema is likely to change (please use
lexicographicSortSchema
on your before/after schemas when comparing).Relationships are now from a codec to a resource, rather than from resource to resource, so all the relationship inflectors (
singleRelation
,singleRelationBackwards
,_manyRelation
,manyRelationConnection
,manyRelationList
) now accept different parameters ({registry, codec, relationName}
instead of{source, relationaName}
).Significant type overhaul, most generic types no longer require generics to be explicitly passed in many circumstances.
PgSelectStep
,PgSelectSingleStep
,PgInsertStep
,PgUpdateStep
andPgDeleteStep
now all accept the resource as their single type parameter rather than accepting the 4 generics they did previously.PgClassExpressionStep
now accepts just a codec and a resource as generics.PgResource
andPgCodec
have gained a newTName extends string
generic at the very front that is used by the registry system to massively improve continuity of the types through all the various APIs.Fixed various issues in schema exporting, and detect more potential issues/oversights automatically.
Fixes an RBAC bug when using superuser role for introspection.
-
#279
fbf1da26a
Thanks @benjie! - listOfCodec type signature changed: all parameters after the first are now a single config object:listOfCodec(listedCodec, extensions, typeDelim, identifier)
->listOfCodec(listedCodec, { extensions, typeDelim, identifier })
. -
#270
c564825f3
Thanks @benjie! -set jit = 'off'
replaced withset jit_optimize_above_cost = -1
so that JIT can still be used but heavy optimization costs are not incurred. -
#271
261eb520b
Thanks @benjie! - 🚨 RENAME ALL THE THINGSThe term 'source' was overloaded, and 'configs' was too vague, and 'databaseName' was misleading, and 'source' behaviours actually applied to resources, and more. So, we've renamed lots of things as part of the API stabilization work. You're probably only affected by the first 2 bullet points.
pgConfigs
->pgServices
(also applies to relatedpgConfig
terms such asmakePgConfig
->makePgService
,MakePgConfigOptions
->MakePgServiceOptions
, etc) - see yourgraphile.config.ts
or equivalent file- All
*:source:*
behaviors are now*:resource:*
behaviors (use regexp/:source\b|\bsource:[a-z$]/
to find the places that need updating) PgDatabaseConfiguration
->PgServiceConfiguration
databaseName
->serviceName
(because it's not the name of the database, it's the name of thepgServices
(which waspgConfigs
) entry)PgResourceConfig::source
->PgResourceConfig.from
('source' is overloaded, so use a more direct term)PgResource::source
->PgResource.from
PgSelectPlanJoin::source
->PgSelectPlanJoin.from
helpers.pgIntrospection.getDatabase
->helpers.pgIntrospection.getService
helpers.pgIntrospection.getExecutorForDatabase
->helpers.pgIntrospection.getExecutorForService
-
#266
395b4a2dd
Thanks @benjie! - The Grafast step class 'execute' and 'stream' methods now have a new additional first argumentcount
which indicates how many results they must return. This means we don't need to rely on thevalues[0].length
trick to determine how many results to return, and thus we can pass through an empty tuple to steps that have no dependencies. -
Updated dependencies [
ae304b33c
,d5312e6b9
,22ec50e36
,0f4709356
,f93c79b94
,53e164cbc
,395b4a2dd
]:- [email protected]
- @dataplan/[email protected]
- [email protected]
- @graphile/[email protected]
-
#257
9e7183c02
Thanks @benjie! - Don't mangle class names, we want them for debugging. -
#257
fce77f40e
Thanks @benjie! - Maintain types through lambda/list (if you get type errors after this update, you may need to put 'readonly' in more of your types).
- Updated dependencies []:
- [email protected]
- @dataplan/[email protected]
- #229
13cfc7501
Thanks @benjie! - pgConfig.listen is no more; it was redundant versus PgSubscriber. Have migrated PgIntrospectionPlugin to use PgSubscriber instead. - Updated dependencies
[
f5a04cf66
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies [
aac8732f9
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
397e8bb40
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
4c2b7d1ca
,c8a56cdc8
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies [
f48860d4f
]:- [email protected]
- @dataplan/[email protected]
-
#214
7e3bfef04
Thanks @benjie! - Correctly drop null/undefined pgSettings keys -
Updated dependencies [
df89aba52
]:- [email protected]
- @dataplan/[email protected]
-
#210
2bd4b619e
Thanks @benjie! - Addextensions.pg = { databaseName, schemaName, name }
to various DB-derived resources (codecs, sources, etc); this replaces theoriginalName
temporary solution that we had previously. -
#210
b523118fe
Thanks @benjie! - Replace BaseGraphQLContext with Grafast.Context throughout. -
Updated dependencies [
b523118fe
]:- [email protected]
- @dataplan/[email protected]
-
#204
92c2378f2
Thanks @benjie! - Ensure codecs 'toPg' and 'fromPg' never have to handle null. -
#206
851b78ef2
Thanks @benjie! - Grafserv now masks untrusted errors by default; trusted errors are constructed via GraphQL's GraphQLError or Grafast's SafeError. -
Updated dependencies [
d76043453
,afa0ea5f6
,851b78ef2
,384b3594f
]:- [email protected]
- @dataplan/[email protected]
-
#202
a14bd2288
Thanks @benjie! - Expose pgWhereConditionSpecListToSQL helper function. -
#201
dca706ad9
Thanks @benjie! - JSON now works how most users would expect it to.
-
e5b664b6f
- Fix "Cannot find module '../package.json'" error -
Updated dependencies [
e5b664b6f
]:- [email protected]
- @dataplan/[email protected]
-
#197
4f5d5bec7
Thanks @benjie! - Fix importing subpaths via ESM -
#200
fb40bd97b
Thanks @benjie! - Move PgSubscriber to @dataplan/pg/adaptors/pg and automatically build it if you setpubsub: true
in yourmakePgConfig
call. -
Updated dependencies [
4f5d5bec7
,25f5a6cbf
]:- [email protected]
- @dataplan/[email protected]
-
0ab95d0b1
- Update sponsors. -
#196
af9bc38c8
Thanks @benjie! - Allow passingpool
directly tomakePgConfig
. -
#190
652cf1073
Thanks @benjie! - 🚨 Breaking changes around types and postgres configuration:GraphileBuild.GraphileResolverContext
renamed toGrafast.Context
GraphileConfig.GraphQLRequestContext
renamed toGrafast.RequestContext
Grafast.PgDatabaseAdaptorOptions
renaed toGraphileConfig.PgDatabaseAdaptorOptions
@dataplan/pg/adaptors/node-postgres
is now@dataplan/pg/adaptors/pg
due to the bizarre naming of PostgreSQL clients on npm - we've decided to use the module name as the unique identifiermakePgConfigs
:- is now
makePgConfig
(singular) - so you'll need to wrap it in an array where you use it - no longer exported by
@dataplan/pg
(because it depended onpg
) - instead each adaptor exposes this helper - so import from@dataplan/pg/adaptors/node-postgres
- accepts an object parameter containing
{connectionString, schemas, superuserConnectionString}
, rather than multiple string parameters
- is now
makeNodePostgresWithPgClient
->makePgAdaptorWithPgClient
postgraphile
CLI will now try and respect the adaptor stated in your preset when overriding connection arguments- Removed
Grafast.RequestContext.httpRequest
and instead useGrafast.RequestContext.node.req/res
; all server adaptors should implement this if appropriate
-
#192
80091a8e0
Thanks @benjie! - - Conflicts inpgConfigs
(e.g. multiple sources using the same 'name') now detected and output- Fix defaults for
pgSettingsKey
andwithPgClientKey
based on config name makePgConfig
now allows passingpgSettings
callback andpgSettingsForIntrospection
config object- Multiple postgres sources now works nicely with multiple
makePgConfig
calls
- Fix defaults for
- Updated dependencies []:
- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
11d6be65e
]:- [email protected]
- @dataplan/[email protected]
- Updated dependencies
[
208166269
]:- [email protected]
- @dataplan/[email protected]
0e440a862
Thanks @benjie! - Add new--superuser-connection
option to allow installing watch fixtures as superuser.
- Updated dependencies []:
- [email protected]
- @dataplan/[email protected]
c4213e91d
- Add pgl.getResolvedPreset() API; fix Ruru respecting graphqlPath setting; replace 'instance' with 'pgl'/'serv' as appropriate; forbid subscriptions on GET
-
9b296ba54
- More secure, more compatible, and lots of fixes across the monorepo -
Updated dependencies [
9b296ba54
]:
- Updated dependencies [
cd37fd02a
]:- [email protected]
- @dataplan/[email protected]
-
768f32681
- Fix peerDependencies ranges -
Updated dependencies [
768f32681
]:- @dataplan/[email protected]
- [email protected]
9ebe3d860
- Fix issue with webpack bundling adaptor
bf83f591d
- Fix deps
-
Updated dependencies [
91f2256b3
]: