- #3121
4b6f5bfThanks @benjie! - Allow PostgreSQL enum table with no values... catch at GraphQL layer.
-
#3110
d228173Thanks @benjie! - Changesproc:filterBybehavior tocondition:proc:filterByso that postgraphile-plugin-connection-filter can usefilter:proc:filterByand they can be controlled independently -
#3105
0b00895Thanks @benjie! - Introduce build.getPgCodecByDatabaseName helper. -
#3108
c67c6efThanks @benjaie! - Turn getGraphQLTypeByPgCodec situations into a string union with central registry so it can be autocompleted. -
#3112
cc61adcThanks @benjie! - Add@isIndexedsmart tag so columns and foreign key constraints can be treated as if they are indexed even if they aren't (for the purposes of the default index behavior plugin)
-
#3084
dd3db66Thanks @benjie! - Add 'oid' as a builtin type. -
#3098
75444acThanks @benjie! - Fix: index behaviors plugin updated so that only attributes (columns) on tables, materialized views and foreign tables are scanned for indexes; all other types (including composite types, views, ...) are given the benefit of the doubt.This might result in more fields showing up in your schema.
-
#3065
9446f64Thanks @benjie! -fieldArgsare now created in the root plan and applied in the layer plan of the target step; this fixes an issue where fieldArgs could not be applied to step with side effects. -
#3088
d3d4376Thanks @benjie! - AddpgResource.extensions.isView,.isMaterializedView,.isForeignTableso plugins can determine which resources came from views/materialized views/foreign tables. -
#3086
65527f8Thanks @benjie! - Addbuild.dataplanJsonproperty - a copy of@dataplan/json -
#3099
4b5b673Thanks @benjie! - PostGraphile will only throw an error when it fails to read enum table values from a table in a published schema (one in theschemaslist in your pgServices); enum tables in other schemas will result in a warning instead (since during the gather phase we don't know whether or not they will be needed come schema build time). -
#3089
24a9481Thanks @benjie! - Domain codecs can now indicate if they have a default value. -
#3063
d3156dfThanks @benjie! - Improve scopes around PgMutationCreatePlugin -
Updated dependencies [
350dd8d,5f95b1c]:- graphile-config@1.1.0
-
#2984
4555428Thanks @benjie! - Re-exportsqlandSQLfromgraphile-build-pg. -
Updated dependencies [
92106c3,86aab72,23c5c6e,dda2e78]:- graphile-config@1.0.1
- pg-introspection@1.0.1
- pg-sql2@5.0.1
Identical to 5.0.0-rc.8.
- #2990
5d408bdThanks @benjie! - No code changes. Updates the release process, cleans up package.json, uses fixed identifiers for peer dependencies (unless they're explicit dependencies also). Hopefully move to trusted publishing. - Updated dependencies
[
5d408bd]:- pg-introspection@1.0.0-rc.5
- graphile-config@1.0.0-rc.6
- pg-sql2@5.0.0-rc.5
-
#2968
f9b5e53Thanks @benjie! - 🚨 PostgreSQL function parametersrequiredproperty has been removed and replaced with its inverseoptional. Checks forparameter.requiredshould be replaced with!parameter.optional. Omitting this configuration option will now have the effect of marking the parameter as required (which matches Postgres' default) rather than optional as before.(A temporary
getterhas been added to allow bothrequiredandoptionalto be used for a short time, but this will output a warning if it's hit and will not persist through an executable schema export. Please update your code to useoptionalinstead ofrequiredas soon as possible, we'll be removing this compatibility shim once V5 is released.) -
Updated dependencies [
f9b5e53]:- @dataplan/pg@1.0.0-rc.7
- #2954
eb9695bThanks @dargmuesli! - Add tsvector and tsquery support
-
#2957
5615d3fThanks @benjie! - Significantly reduce the size of a PostGraphile exported schema (around 20% reduction on test fixtures) by:- marking optional things as optional
- excluding many optional things from being specified in configuration objects
(including
tagsobjects if no tags are present) - using
LIST_TYPESfor PostgreSQL builtin list types - extracting inline function definitions to be global functions where appropriate, and simplifying functions where not
Breaking changes to types (but more accurate reflection of reality):
extensionsis now marked as optional in many places.extensions.tagsis now marked optional in many places.PgCodecAttribute.notNullis now marked as optional.PgResourceParameter.requiresis now marked as optional.PgCodecRelation.isUniqueis now marked as optional.pgGetArgDetailsFromParameters().argDetails.postgresArgNameis now optional (may returnundefinedin addition tonull) and.requiredis now optional (returnsboolean | undefined)
-
#2956
b793077Thanks @benjie! - Internal refactor: replace usage of isExecutableStep/assertExecutableStep with isStep/assertStep. -
#2965
d15e1c2Thanks @benjie! - Make EXPORTABLE's scope a readonly array for greater compatibility. -
#2965
5821e39Thanks @benjie! - Further reduce the size of schema exports by optimizing plan functions -
#2959
c9fd9f3Thanks @benjie! - Use shared logic to decrease export size. -
#2964
8543720Thanks @benjie! - Reduce export size by simplifying a plan resolver. -
#2962
b73416bThanks @benjaie! - Improve export optimization to remove redundant repeated identifier arguments from local helper function calls, resulting in smaller and more straight-forward exports and easier optimizations for third-party plugins whereimports are discouraged. -
Updated dependencies [
5615d3f,b793077,8384026,81ade71,57dfa70,d15e1c2,eb9695b,c0b8af9,5821e39,c9fd9f3,60c8690]:- graphile-build@5.0.0-rc.5
- @dataplan/pg@1.0.0-rc.6
- grafast@1.0.0-rc.8
- tamedevil@0.1.0-rc.5
- #2937
8f50146Thanks @benjie! - Eliminate dangling promises, reducing chance of process exit due to unhandled promise rejection. - Updated dependencies
[
8f50146,5e83533,03e5ce5,f213a8e]:- graphile-config@1.0.0-rc.5
- @dataplan/pg@1.0.0-rc.5
- grafast@1.0.0-rc.7
-
a3722d6Thanks @benjie! - Refactor to enable TypeScript options rewriteRelativeImportExtensions and erasableSyntaxOnly (including using .ts extensions in source code) -
#2922
5fc379eThanks @benjaie! - Fix some JSDoc comments and enable linting for these. -
#2927
1d5d63eThanks @benjie! - Added Fastify v5 adaptor (copy/paste of v4 adaptor) -
#2897
7ca663eThanks @benjie! - Fix various places whereinflection.builtin()was not called, and thus changes to builtin inflection were not reflected. (Also adds test to prevent regression.) -
Updated dependencies [
9eb3829,a3722d6,e1fcecc,0f913ee,5fc379e,7ca663e]:- graphile-build@5.0.0-rc.4
- pg-introspection@1.0.0-rc.4
- graphile-config@1.0.0-rc.4
- @dataplan/pg@1.0.0-rc.4
- grafast@1.0.0-rc.5
- tamedevil@0.1.0-rc.4
- pg-sql2@5.0.0-rc.4
-
#2867
86db203Thanks @benjie! - Change type of GraphileBuild.Build.sql to be more explicit. -
#2877
1e45a3dThanks @benjie! - Safety - use null prototype objects in more places. -
#2873
0772086Thanks @benjie! - Update TypeScript configuration to support Node 22 minimum -
#2887
a565503Thanks @benjie! - Internals reworked to usePromise.withResolvers()instead of removeddefer()function. -
#2888
1a56db2Thanks @benjaie! - Node v22+ is required for this module. -
#2850
456d387Thanks @benjie! - Handle primary key columns calledId,IDand... I guess...iDwhen renamingid->rowIdto make space for theid: ID!Relay column when using the Amber preset without V4 preset. -
#2880
c65d03cThanks @benjie! - Fix PgIntrospectionPlugin to handle new PgSubscriber behavior where subscriptions aren't auto-restored -
#2868
a258427Thanks @benjie! - Overhaul types of.where(),.having(),.orderBy()and similar methods to avoid invalid embeds resulting in runtime errors - TypeScript should complain if you do the wrong thing now. To fix your code in most cases you can switch to the callback form: e.g..orderBy({ ... })becomes.orderBy(sql => ({ ... }))- thesqlhere is scoped to explicitly allow some embeds. -
Updated dependencies [
44555c7,b69a2b0,c2ae685,1e45a3d,0772086,a60ed2a,a565503,d9ccc82,1a56db2,eafa3f0,22bfbc0,bd3250e,db3d7cb,b27c562,f23f0cf,afe31f0,d3a1be9,a258427,65d9556]:- grafast@1.0.0-rc.4
- @dataplan/pg@1.0.0-rc.3
- graphile-build@5.0.0-rc.3
- graphile-config@1.0.0-rc.3
- pg-introspection@1.0.0-rc.3
- pg-sql2@5.0.0-rc.3
- tamedevil@0.1.0-rc.3
-
#2806
5ad7ad0Thanks @benjie! - Fix issues with extending interfaces by adding newbuild.appendhelper. -
#2834
bd6b605Thanks @benjie! - Hide conflict errors when installing watch fixtures. -
Updated dependencies [
5ad7ad0,f3a9869,68f61cd,8cfe23f,a82e6fa]:- graphile-build@5.0.0-rc.2
- grafast@1.0.0-rc.2
- pg-sql2@5.0.0-rc.2
- pg-introspection@1.0.0-rc.2
- graphile-config@1.0.0-rc.2
- @dataplan/pg@1.0.0-rc.2
- tamedevil@0.1.0-rc.2
-
#2752
92781a1Thanks @benjie! - Softens the requirements for a column/relation to be treated as "indexed" to reflect the optimizations in Postgres v18+. (This may result in more fields, filters, orders and relations appearing in your PostGraphile schema - you can use@behavior -filterBy -orderByon columns and@behavior -select -list -connection -single -manyToManyon foreign key constraints to remove them again.) -
#2758
eb39702Thanks @benjie! - ApplypgOrderByNullsLastto computed columns too. -
Updated dependencies [
9797500,be318e6,abb623d,31b388c,930240a,7b86454,42a0785,d196d60,982c1a5,6a4e3b9,c6cbe61,d4ac603,8a5a7c5,ea0135f,91b8376,b6821f5]:- @dataplan/pg@1.0.0-rc.1
- grafast@1.0.0-rc.1
- pg-sql2@5.0.0-rc.1
- graphile-build@5.0.0-rc.1
- pg-introspection@1.0.0-rc.1
- graphile-config@1.0.0-rc.1
- tamedevil@0.1.0-rc.1
-
#2730
4c3cf22Thanks @benjie! - Updategraphqlversion range -
#2142
0465b4aThanks @benjie! - GraphQL v16.9.0+ is now required for enum thunk support (enums will now break without this) -
#2716
a0a6082Thanks @benjie! - Add ability for Postgres client to captureRAISE NOTIFYissued during an SQL query. An example follows:Database:
create table foo (id serial primary key, bar text); create function tg_foo() returns trigger language plpgsql volatile as $ begin raise notice 'Hello World' using hint = 'Hi, ' || NEW.bar; return NEW; end; $; create trigger _insert before insert on foo for each row execute function tg_foo();
Plugin:
const plugin = extendSchema({ typeDefs: /* GraphQL */ ` type PgNotice { severity: String message: String code: String detail: String hint: String } extend type CreateFooPayload { messages: [PgNotice] } `, plans: { CreateFooPayload: { messages($payload: any) { const $result = get($payload, "result") as PgInsertSingleStep; return $result.getNotices(); }, }, }, });
Result:
{ "data": { "createFoo": { "clientMutationId": null, "foo": { "id": "WyJmb29zIiwzXQ==", "bar": "inputvalue" }, "messages": [ { "severity": "NOTICE", "message": "Hello World", "code": "00000", "detail": null, "hint": "Hi, inputvalue" } ] } } } -
#2709
b539002Thanks @benjie! - Fix a bug in watch fixtures where refreshing a materialized view would result in the schema being rebuilt (thanks @zarybnicky!) -
#2711
020b579Thanks @JannisKoeksel! - Add missing exports for 4 plugins (thanks @JannisKoeksel) -
#2723
e790f7aThanks @benjie! -@dataplan/pgnow exportssqlfrompg-sql2and also adds forwards to the whole module (import ... from '@dataplan/pg/pg-sql2') -
#2706
13eb44bThanks @benjie! - Makes isPgCreateMutation/isPgUpdateMutation/isPgDeleteMutation scope available, and sets the resource for easier hooking of mutation fields. -
#2718
74e15d5Thanks @benjie! - Port the "enum table domains" feature from PostGraphile V4, so enum table values can be used as input and output from PostgreSQL functions. -
#2715
3488ac0Thanks @benjie! - Add shortcuts for improved DX:build.pgResources←build.input.pgRegistry.pgResourcesbuild.pgCodecs←build.input.pgRegistry.pgCodecsbuild.pgRelations←build.input.pgRegistry.pgRelationsbuild.pgExecutoris the first executor (the only executor unless you're using multiple databases)
-
#2718
b20a63fThanks @benjie! - Move agraphile-build-pgtype out of@dataplan/pg -
#2725
d414491Thanks @benjie! - Enable partitions to be exposed via the@partitionExpose childor@partitionExpose bothsmart tags on the partitioned table. Also adds a global configuration option for managing the default setting for this (parentby default: only expose the parent partitioned table, not its underlying child partitions). -
#2723
05f3e44Thanks @benjie! -ObjectStep<PgExecutorContextPlans<...>>is deprecated; please useStep<PgExecutorContext<...>>instead. -
#2723
81c62bbThanks @benjie! - makePgResourceOptions() is now simply pgResourceOptions() -
Updated dependencies [
4c3cf22,7ce4d41,0465b4a,71e0af2,a0a6082,ab96e5f,278b4d3,eaa771b,e28e4d9,e790f7a,c8412aa,d0c15cc,b20a63f,1ec7ee5,bffbb77,c48ca48,05f3e44,81c62bb]:- graphile-build@5.0.0-beta.39
- @dataplan/pg@0.0.1-beta.39
- grafast@0.1.1-beta.27
- pg-introspection@0.0.1-beta.13
- #2700
dcd3583Thanks @benjie! - Switch to consistently using workspace:^ dependencies (in an attempt to appease pnpm) - Updated dependencies
[
dcd3583]:- @dataplan/pg@0.0.1-beta.38
-
#2686
5dbb9e8Thanks @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. -
#2683
68a1243Thanks @benjie! - 🚨 Refs no longer have singularized/pluralized names - we take the name verbatim and apply the list/connection suffix to it as needed.If you need the old naming back, please use this plugin (untested):
const MyRefsInflectionPlugin = { name: "MyRefsInflectionPlugin", inflection: { replace: { refSingle(orig, resolvedPreset, { refDefinition, identifier }) { return ( refDefinition.singleRecordFieldName ?? this.singularize(identifier) ); }, refList(orig, resolvedPreset, { refDefinition, identifier }) { return ( refDefinition.listFieldName ?? this.listField(this.pluralize(this.singularize(identifier))) ); }, refConnection(orig, resolvedPreset, { refDefinition, identifier }) { return ( refDefinition.connectionFieldName ?? this.connectionField(this.pluralize(this.singularize(identifier))) ); }, }, }, };
-
#2689
6762c70Thanks @benjie! - Fix bug in PgIndexBehaviorsPlugin that would treat all view attributes as unindexed. Views can't have indexes, so we must give them the benefit of the doubt. -
#2687
7766c19Thanks @benjie! - Fix issue whereby nodeId:insert/nodeId:update permissions were not rejected by PgRBACPlugin when the underlying columns were not writable. -
#2678
6dafac1Thanks @benjie! - Remove peer dependency optionality in an attempt to satisfy pnpm's installation algorithms -
Updated dependencies [
5dbb9e8,cfd4c3c,c3f9c38,3d5c464,05b971e,13513dd,bc2b188,87a4c92,703d162,c13813e,4a9072b,6dafac1,e15f886,34efed0,185d449,e2048e2]:- @dataplan/pg@0.0.1-beta.37
- graphile-config@0.0.1-beta.18
- grafast@0.1.1-beta.26
- graphile-build@5.0.0-beta.38
- tamedevil@0.0.0-beta.9
-
9e21b2aThanks @benjie! - Allow changing the Node ID codec from the default (base64JSON) to your own default via thepreset.schema.defaultNodeIdCodecsetting, or even override it on a per-table basis with the@nodeIdCodecsmart tag. Thanks @jsmnbom! -
#2648
73f626bThanks @benjie! - Internal refactor of PgTableNodePlugin for safety. -
Updated dependencies [
9e21b2a,2adfd6e,6113518]:- graphile-build@5.0.0-beta.37
- @dataplan/pg@0.0.1-beta.36
- grafast@0.1.1-beta.25
- #2635
85c8364Thanks @benjie! - Remove non-functional fields generated from mode:union-returning functions from the schema.
-
#2559
4c8f028Thanks @benjie! - Removemake...Pluginprefix/suffix from plugin factories. (Old name is still supported but deprecated, this is non-breaking.) -
#2571
5451c90Thanks @slaskis! - Add support for JSONPath type (thanks @slaskis!) -
#2571
7147cb0Thanks @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
7847c0bThanks @benjie! - Fixes a bug where ordering or filtering by 'via' attributes (such as those from polymorphic 'relational' tables) resulted in an error. -
#2593
0e6c4e0Thanks @benjie! - 🚨resource.resolveVia()has changed result format; from{ relation: string, attribute: string }to{ relationName: string, attributeName: string, relation: PgCodecRelation, attribute: PgCodecAttribute }. If you useresolveVia, please be sure to extract the correct properties. -
#2600
ad588ecThanks @benjie! - Mark all peerDependencies=dependencies modules as optional peerDependencies to make pnpm marginally happier hopefully. -
Updated dependencies [
6abfd4f,5451c90,c54c6db,7147cb0,9aa2637,7847c0b,9d86063,0e6c4e0,ad588ec]:- pg-introspection@0.0.1-beta.12
- @dataplan/pg@0.0.1-beta.35
- grafast@0.1.1-beta.24
- graphile-build@5.0.0-beta.36
-
Updated dependencies [
0c6b1f1,e0cdabe]:- graphile-build@5.0.0-beta.35
- graphile-config@0.0.1-beta.17
- @dataplan/pg@0.0.1-beta.34
- grafast@0.1.1-beta.23
- #2575
5c802ea6819361eed36b75f246ae0adb35b14669Thanks @benjie! - Fixes a bug in relational polymorphism where PostgreSQL functions returning polymorphic records were causing planning errors. - Updated dependencies []:
- @dataplan/pg@0.0.1-beta.33
- graphile-build@5.0.0-beta.34
-
#2436
142e39f26ce329f09bee0b5427f1ddc5103e610eThanks @benjie! - Don't apply the limitToTypes step if the argument wasn't specified. -
#2525
09d95319be3e25e023dfbab9d1542dfe06f65355Thanks @benjie! - Plan computed column inputs (particularly Node IDs) in the root layer plan, allowing for greater plan deduplication and more efficient SQL generation. -
#2482
459e1869a2ec58925b2bac5458af487c52a8ca37Thanks @benjie! - Minimum version of Node.js bumped to Node 22 (the latest LTS). -
#2521
c43ed67b9d3acbadb172ee88ba9c2a4d32528a25Thanks @benjie! - Fix bug in nullable nodeID handling for computed column arguments with the Relay preset that was causing the entire select to be inhibited on null/undefined. -
#2517
455f4811d37ad8fff91183c7a88621bcf9d79acfThanks @benjie! - Various of our steps weren't as crisp on types as they could be. This makes them a lot stricter:coalesce()now yieldsnullif it failseach()now reflects the type of the list item even if it's not a "list capable" steploadOne()/loadMany()can now track the underlying nullability of the callback (can differentiateMaybe<ReadonlyArrray<Maybe<Thing>>>fromReadonlyArray<Maybe<Thing>>fromReadonlyArray<Thing> | nulletc)pgSelectFromRecord(for@dataplan/pgusers) no longer requires a mutable array
🚨 This will potentially break your plan types quite a bit. In particular, the
LoadOneCallbackandLoadManyCallbacktypes 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>>>forLoadManyCallback. They have sensible defaults if you only specify the first two generics. -
#2523
b05d57b932ea00d10715dcab9f79d443408881fcThanks @Dacjan! - Fix bug with@ref ... pluralsmart tag where multiple@refViaare present but the target type is not abstract. -
Updated dependencies [
0e36cb9077c76710d2e407830323f86c5038126e,5a26196eff8fd1956d73e0b8fdf5cfcb7f01b7d3,c0c3f48fa9f60cb9a4436ea135979b779ecc71ec,cef9a37f846b4af105ac20960530d65c9f44afa9,56ce94a847c6a4094643665cbf5d3712f56140b6,070467c4ea693a2516fc8006bebb88b1ab96fb26,192a27e08763ea26607344a2ea6c7f5c595cc2a3,6ef6abce15936a896156d5316020df55cf7d18e3,0239c2d519300a72f545e0db7c371adae4ade2a9,0ea439d33ccef7f8d01ac5f54893ab2bbf1cbd4d,8034614d1078b1bd177b6e7fcc949420614e3245,a830770e775a65ce1d09fa767f38e84f5c0e5139,459e1869a2ec58925b2bac5458af487c52a8ca37,c350e49e372ec12a4cbf04fb6b4260e01832d12b,3176ea3e57d626b39613a73117ef97627370ec83,46a42f5547c041289aa98657ebc6815f4b6c8539,a87bbd76f1a8b60fd86de65922746d830cc160b4,be3f174c5aae8fe78a240e1bc4e1de7f18644b43,576fb8bad56cb940ab444574d752e914d462018a,9f459101fa4428aa4bac71531e75f99e33da8e17,921665df8babe2651ab3b5886ab68bb518f2125b,78bb1a615754d772a5fda000e96073c91fa9eba7,c9cd0cc72a4db4b02b2bdf770161c9346cb4b174,ab0bcda5fc3c136eea09493a7d9ed4542975858e,455f4811d37ad8fff91183c7a88621bcf9d79acf,45adaff886e7cd72b864150927be6c0cb4a7dfe8]:- grafast@0.1.1-beta.22
- pg-sql2@5.0.0-beta.9
- @dataplan/pg@0.0.1-beta.33
- graphile-build@5.0.0-beta.34
- graphile-config@0.0.1-beta.16
- pg-introspection@0.0.1-beta.11
- tamedevil@0.0.0-beta.8
-
#2407
be1e558d6a1a8cae3bf4b5724c340469d8837504Thanks @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. -
#2377
7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7Thanks @benjie! - SinceModifierStepandBaseStepare no more;ExecutableStepcan be renamed to simplyStep. The old name (ExecutableStep) is now deprecated. -
#2424
e6da5d956ab696932410e7172cedfacba71dbf5eThanks @benjie! - Small tweaks to make exported schemas have nicer formatting. -
#2407
ba2bfa15deaaddd92757a56c2b761624afe940bdThanks @benjie! - Add makeArgsRuntime helper to enable generating the argument expressions for a PostgreSQL function at runtime, as required by postgraphile-plugin-connection-filter. -
#2398
c041fd250372c57601188b65a6411c8f440afab6Thanks @benjie! - Since the following have been removed from Grafast, throw an error if they're seen in the schema:autoApplyAfterParentInputPlanautoApplyAfterParentApplyPlanautoApplyAfterParentPlanautoApplyAfterParentSubscribePlaninputPlanapplyPlanon input fields
Also: when Query type fails to build, throw the underlying error directly.
-
#2384
6d19724330d50d076aab9442660fa8abddd095cbThanks @benjie! - Move postgresql argument logic to runtime (from plantime) to avoid plantime eval of input values. -
#2376
da6f3c04efe3d8634c0bc3fcf93ac2518de85322Thanks @benjie! - Overhaul Grafast to remove more input planning - inputs should be evaluated at runtime - and remove more plan-time step evaluation.FieldArgs.getis no more; useFieldArgs.getRawor usebakedInput()(TODO: document) to get the "baked" version of a raw input value.Input object fields no longer have
applyPlan/inputPlan, instead having the runtime equivalentsapply()andbaked().FieldArgsis no longer available on input object fields, since these fields are no longer called at plantime; instead, the actual value is passed.FieldArgsgains.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)FieldArgobject representing the argument value itself.autoApplyAfterParentPlanis no more - instead if an argument hasapplyPlanit will be called automatically unless it was called during the field plan resolver itself.autoApplyAfterParentSubscribePlanis no more - instead if an argument hasapplySubscribePlanit will be called automatically unless it was called during the field plan resolver itself.Field arguments no longer support
inputPlan- usebakedInput()if you need that.Input fields no longer support
inputPlan,applyPlan,autoApplyAfterParentInputPlannorautoApplyAfterParentApplyPlan. Instead,apply()(which is called byapplyStep()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.placeholderhas been removed from all places that are now runtime - namely the list of modifiers below...The following
ModifierStepclasses have all dropped theirStepsuffix, theseModifierclasses now all run at runtime, and are thus no longer steps; they're invoked as part of the newapplyInput()(TODO: document) step:ModifierStep⇒ModifierPgBooleanFilterStep⇒PgBooleanFilterPgClassFilterStep⇒PgClassFilterPgConditionCapableParentStep⇒PgConditionCapableParentPgConditionLikeStep⇒PgConditionLikePgConditionStepMode⇒PgConditionModePgConditionStep⇒PgConditionPgManyFilterStep⇒PgManyFilterPgOrFilterStep⇒PgOrFilterPgTempTableStep⇒PgTempTableSetterCapableStep⇒SetterCapableSetterStep⇒Setter
(Interestingly, other than the removal of
placeholderand 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- usefieldArg.apply($unionAll, qb => qb.whereBuilder())insteadPgUnionAllStep.havingPlan- usefieldArg.apply($unionAll, qb => qb.havingBuilder())instead- Same for PgSelectStep
The following gain query builders:
PgInsertSinglePgUpdateSinglePgDeleteSingle
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 implementclientMutationId.Extends query builders with additional functionality.
Many of the types have had their generics changed, TypeScript should guide you if you have issues here.
NodeIdHandlernow requires agetIdentifiersmethod 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
8026b982a81776fb3d1d808392970c2d678c4023Thanks @benjie! - Start migrating away fromapplyPlan/inputPlan.When adding an argument to a field you can now augment the field's plan resolver via(this was later replaced with newcontext.addToPlanResolverhookinputApply()step, and arguments still keepapplyPlanthough input object fields lose it). Use this and other changes to move handling of orderBy to runtime from plantime.Introduces runtime query builder for
PgSelectStepandPgUnionAllStep, andPgSelectStep.apply()/PgUnionAllStep.apply()so that you can register callbacks that will augment the query builder at runtime. -
#2407
15854c5109114919b3d38fa675c539cda1f634a1Thanks @benjie! - Ensures that theconditionargument is added before theorderByargument is added. This was necessary due to postgraphile-plugin-fulltext-filter wishing to order by the result of having added a condition (so adding the condition must come first). -
Updated dependencies [
d34014a9a3c469154cc796086ba13719954731e5,d3ae3415c230784fdfefc9d192ad93aca462bceb,98516379ac355a0833a64e002f3717cc3a1d6473,f8602d05eed3247c90b87c55d7af580d1698effc,65df25534fa3f787ba2ab7fd9547d295ff2b1288,1b3c76efd27df73eab3a5a1d221ce13de4cd6b1a,f6e22692b628703b8ea48e580dc0b6f0bcbc9c5a,e10c372dafbe0d6014b1e946349b22f40aa87ef9,c3538050abbb485cf1d43f7c870b89f1ad7c2218,3c0a925f26f10cae627a23c49c75ccd8d76b60c8,fcaeb48844156e258a037f420ea1505edb50c52a,68926abc31c32ce527327ffbb1ede4b0b7be446b,98c5009e21e423b0da22c2cb70cdb62909578f50,4b49dbd2df3b339a2ba3f1e9ff400fa1a125298b,d7950e8e28ec6106a4ce2f7fe5e35d88b10eac48,c8f1971ea4198633ec97f72f82abf65089f71a88,182ed0564104f59b012e0f9ffd452556b0927750,dd3d22eab73a8554715bf1111e30586251f69a88,a120a8e43b24dfc174950cdbb69e481272a0b45e,be1e558d6a1a8cae3bf4b5724c340469d8837504,3b0f5082b2272997ce33ce8823a4752513d19e28,84f06eafa051e907a3050237ac6ee5aefb184652,4a3aeaa77c8b8d2e39c1a9d05581d0c613b812cf,3789326b2e2fdb86519acc75e606c752ddefe590,12d3a7174949794a1679132635e196f5dadce8a2,ab7658ac44e1a5a0a98c6bb688a26d94b1175cc1,bc2a00d35f0a1954dba22e857adc3f4e2f5118e5,ceeb9a6b63e566b09298e0440a385943302ad0f9,3e8c64bef928295494119e15e1e55cbdadb696fa,0fc2db95d90df918cf5c59ef85f22ac78d8000d3,90e81a5deeae554a8be2dd55dcd01489860e96e6,836c8327a5ca1bd3c69f72055e71d00694de363e,2f31836cb89a7ab27a8919803fe12b53a46d77e4,c59132eb7a93bc82493d2f1ca050db8aaea9f4d1,7c38cdeffe034c9b4f5cdd03a8f7f446bd52dcb7,728888b28fcd2a6fc481e0ccdfe20d41181a091f,f4f39092d7a51517668384945895d3b450237cce,5cf3dc9d158891eaf324b2cd4f485d1d4bbb6b5e,925689578ee9def403382df70f0e003bb299c166,83d3b533e702cc875b46ba2ca02bf3642b421be8,7001138c38e09822ad13db1018c62d2cac37941e,e9e7e33665e22ec397e9ead054d2e4aad3eadc8c,bb6ec8d834e3e630e28316196246f514114a2296,3e188c2e981193d228ba3b7433f5e326336f629b,07a5469e5d3d050a7bcab928bb751c9e150d2e49,e6da5d956ab696932410e7172cedfacba71dbf5e,2b1918d053f590cdc534c8cb81f7e74e96c1bbe6,037a1bcdc8ed8493d4748e08c18f258e4382a815,72b300b436a7acedaa7d0e3a7a5458d15a0e5396,770363214ee630746cddc9080dec22bbf38a3bb5,d1ecb39693a341f85762b27012ec4ea013857b0c,042ebafe11fcf7e2ecac9b131265a55dddd42a6d,fa005eb0783c58a2476add984fbdd462e0e91dbe,df0e5a0f968cf6f9ae97b68745a9a2f391324bf5,ef4cf75acd80e6b9c700c2b5a7ace899e565ef7f,ba2bfa15deaaddd92757a56c2b761624afe940bd,c041fd250372c57601188b65a6411c8f440afab6,629b45aab49151810f6efc18ac18f7d735626433,6d19724330d50d076aab9442660fa8abddd095cb,ca5bc1a834df7b894088fb8602a12f9fcff55b38,da6f3c04efe3d8634c0bc3fcf93ac2518de85322,8026b982a81776fb3d1d808392970c2d678c4023,d257a1a1e59a7d4da0bf67345c07b04c04a2f7da,00d79e6f5608affc3f36bb0ce4ca2547230174e7,412b92a0b1e03ad962521f630b57a996d8620cf6,f0bc64b71914dfdd3612f4b65370401fd85b97bc]:- grafast@0.1.1-beta.21
- @dataplan/pg@0.0.1-beta.32
- pg-sql2@5.0.0-beta.8
- graphile-build@5.0.0-beta.33
- graphile-config@0.0.1-beta.15
- Updated dependencies
[
fc9d64eb8,a2dbad945,31078842a,5a0ec31de]:- @dataplan/pg@0.0.1-beta.31
- grafast@0.1.1-beta.20
- graphile-build@5.0.0-beta.32
- Updated dependencies
[
83c546509]:- graphile-config@0.0.1-beta.14
- @dataplan/pg@0.0.1-beta.30
- grafast@0.1.1-beta.19
- graphile-build@5.0.0-beta.31
- Updated dependencies
[
7580bc16a,b336a5829]:- graphile-config@0.0.1-beta.13
- @dataplan/pg@0.0.1-beta.29
- grafast@0.1.1-beta.18
- graphile-build@5.0.0-beta.30
- #2269
bee1db4f4Thanks @benjie! - Hotfix to inflection changes in beta.34 - fixes behavior oforderByAttributeEnumand removes V4 override of_joinAttributeNameswhich shouldn't be necessary (and seems to do more harm than good).
-
#2251
555d65cceThanks @benjie! - We now enforce GraphQL name checks earlier and supply more information to better reveal where any invalid names are originating. -
#2251
efa25d97dThanks @benjie! - 🚨 Inflection changes! V4 preset should be (mostly) unaffected, but Amber preset will likely have changes betweenIDandROW_IDin various places, plus missing underscores may reappear/etc. Be sure to diff your schema before/after this update (as you should with every update... and to be honest, with everything else that changes your schema).Normally
camelCase/upperCamelCase/constantCase/etc are the final step before we name a field/type/enumValue/etc; however it turns out that some inflectors were using the camel-cased output as input to their own inflection - for example, when calculating the name of a relation it would take the column names camel-cased and then combine them into a string which was then camel-cased again. Even worse, when these values are then used in an enum, it would then be constant-cased, so you end up with string 👉 camel-case 👉 concatenate 👉 camel-case 👉 concatenate 👉 constant-case. This lead to certain edge cases where fields with numbers or underscores may come out in unexpected ways.This release creates "raw" backing inflectors for a few things that remove the final step (camel-casing) so that later usage may choose to use the raw value rather than the camel-cased value. And due to this, we've also moved the
id👉rowIdtweaks from theattribute()inflector into the_attributeName()inflector - which is where most of the changes have come from. We've undone this change in the V4 preset, so if you don't use the V5 preset but need to undo this change, please check out the V4 overrides of:Note: the V4 preset is fairly stable, but the Amber preset is being constantly iterated to improve the OOTB V5 experience - it will only be stable once V5.0.0 is released.
-
#2261
a202145c5Thanks @benjie! - Fix bug causing modifications to introspection results (e.g. fake constraints) to be persisted to next watch tick via gather cache. -
#2257
2a37fb99aThanks @benjie! - Overhaul how PostgreSQL arrays are handled, and fix the "empty arrays become null" bug caused by usingarray_agg(). -
#2265
5d9f2de85Thanks @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. -
#2251
84f07626dThanks @benjie! - 🚨orderByAttributeEnuminflector no longer requires/provides attribute - it can be trivially fetched fromcodecandattributeNameviaconst attribute = codec.attributes[attributeName] -
#2250
86e228299Thanks @benjie! - Integrate preset.lib into build and gather context so plugins can use modules without needing to install dependencies (and thus avoiding the dual package hazard). -
#2249
933786868Thanks @benjie! -PgCodec.extensions.pg.serviceNameis now nullable to indicate natively supported PG types. -
Updated dependencies [
555d65cce,69ab227b5,efa25d97d,d13b76f0f,b167bd849,dc5746594,7bf045282,2a37fb99a,5d9f2de85,6a13ecbd4,86e228299,cba6ee06d]:- graphile-build@5.0.0-beta.29
- grafast@0.1.1-beta.17
- graphile-config@0.0.1-beta.12
- pg-introspection@0.0.1-beta.10
- pg-sql2@5.0.0-beta.7
- @dataplan/pg@0.0.1-beta.28
-
#2229
87bdf9730Thanks @benjie! - Fixes bug handling optional arguments to computed column functions. -
#2230
aa480f6a3Thanks @benjie! - Fix bug recognizing the required-ness of arguments to functions usingoutargs orreturns table- this particularly affects people usingpgStrictFunctionsand should result in a couple of required arguments becoming nullable. -
Updated dependencies [
5626c7d36,76c7340b7]:- graphile-config@0.0.1-beta.11
- grafast@0.1.1-beta.16
- @dataplan/pg@0.0.1-beta.27
- graphile-build@5.0.0-beta.28
- #2208
632691409Thanks @benjie! - Behaviors can now be registered by more than one plugin. Apply behaviors to more entities. Don't log so much. - Updated dependencies
[
632691409]:- graphile-build@5.0.0-beta.27
-
#2207
0b1f7b577Thanks @benjie! - Fix overwhelming logs and errors being output by the new behavior system -
Updated dependencies [
0b1f7b577]:- graphile-build@5.0.0-beta.26
-
#2197
d7e6e714fThanks @benjie! - Amber preset now supports@resultFieldNameon mutation functions, like V4 preset does. -
#2187
bb006ec7bThanks @benjie! - Fix behavior inheritance especially around functions incorrectly inheriting from their underlying codecs, bugs in unlogged/temp table behavior, and incorrect skipping of generating table types. You may find after this change you have fields appearing in your schema that were not present before, typically these will represent database functions where you@omit'd the underlying table - omitting the table should not prevent a function from accessing it. Further, fix behavior of@omit reademulation to add-connection -list -array -single. -
#2156
6fdc6cad8Thanks @benjie! - AddedpgRegistry.pgExecutorsso 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. -
#2189
0df171123Thanks @benjie! - Fix issue with manyToMany behavior warnings -
#2158
dfac43992Thanks @benjie! - 🚨 Amber preset no longer enables backward pagination options (before,last) on functions by default - add+backwardsbehavior to these functions to enable. If you're using the V4 preset you should be unaffected by this change because it enables+backwardsby default. -
#2160
426e9320eThanks @benjie! - Massive overhaul of the behavior system which now has a centralized registry of known behaviors and applies behaviors in a more careful and nuanced way, removing many hacks and workarounds, and ultimately meaning thatdefaultBehavior: "-*"should now operate correctly. Importantly,addBehaviorToTags()has been removed - you should useplugin.schema.entityBehaviorsto indicate behaviors as shown in this PR - do not mod the tags directly unless they're explicitly meant to be overrides.Technically this is a significant breaking change (besides the removal of the
addBehaviorToTags()helper) because the order in which behaviors are applied has changed, and so a different behavior might ultimately "win". This shows up in places where there is ambiguity, for example if you add@filterableto a function that you don't have execute permissions on, that function will now show up in the schema since user overrides (smart tags) "win" versus inferred behaviors such as introspected permissions; this wasn't the case before. Hopefully most users will not notice any difference, and for those who do, thegraphile behavior debugCLI may be able to help you figure out what's going on.Be sure to print your schema before and after this update and look for changes; if there are changes then you likely need to fix the relevant behaviors/smart tags. (Hopefully there's no changes for you!)
You'll also need to change any places where you're specifying behaviors that will be type checked; you can either cast your existing strings e.g.
defaultBehavior: "+connection -list" as GraphileBuild.BehaviorString, or preferably you can specify your behaviors as an array, which should give you auto-complete on each entry; e.g.defaultBehavior: ["connection", "-list"]. -
#2188
cc0941731Thanks @benjie! - Overhaul the way in whichgraphile-configpresets work such that including a preset at two different layers shouldn't result in unexpected behavior. -
#2157
50f6ce456Thanks @benjie! - 🚨 PostGraphile now ignores unlogged database tables by default. -
#2199
3b09b414fThanks @benjie! - Database enum comments are now reflected in the schema. -
#2196
b7b6dd64fThanks @benjie! - 🚨@notNullon a volatile function now results in the field on the payload becoming non-null, not the mutation field itself. -
#2155
8b472cd51Thanks @benjie! -disablePluginsnow supports TypeScript auto-completion of known plugin names. Other names are still accepted without error, so this is just a minor DX improvement rather than type safety. -
#2198
ba637b56dThanks @benjie! - Ensure that interface subtypes are added to schema even if not referenced directly. -
Updated dependencies [
d5834def1,653929af0,6fdc6cad8,42b982463,eb69c7361,54054b873,884a4b429,1eac03ec2,38835313a,426e9320e,2efadc0f8,e8a9fd424,cc0941731,50f6ce456,b0865d169,3b09b414f,8b472cd51,ba637b56d,9cd9bb522]:- grafast@0.1.1-beta.15
- graphile-build@5.0.0-beta.25
- @dataplan/pg@0.0.1-beta.26
- pg-introspection@0.0.1-beta.9
- graphile-config@0.0.1-beta.10
-
#2149
52ef49ca9Thanks @benjie! - Fixed a bug in 'relational' polymorphism where relations to each of the concrete types would non-sensically be added to each of the concrete types. -
#2149
d9d07b97bThanks @benjie! - 🚨pgCodecRefbehaviors are now presented a[codec, refName]tuple rather than the ref object directly. You can get the oldrefobject viacodec.refs?.[refName] -
Updated dependencies [
82ce02cd9,871d32b2a,e8a0c4441,a26e3a30c,eca7e62e2,02c11a4d4]:- @dataplan/pg@0.0.1-beta.25
- grafast@0.1.1-beta.14
- graphile-build@5.0.0-beta.24
- Updated dependencies
[
807650035]:- @dataplan/pg@0.0.1-beta.24
- grafast@0.1.1-beta.13
- graphile-build@5.0.0-beta.23
-
#2129
1f67999ebThanks @benjie! - Fix bug in orderBy planning that caused a new plan to be required for every request. -
#1985
d6102714eThanks @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 usingmakePgServiceto construct yourpgServicesrather 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:
PgAdaptorOptionshas been renamed toPgAdaptorSettings, so please do a global find and replace for that. -
Updated dependencies [
1bd50b61e,8bdc553b7,4e102b1a1,1cabbd311,7bb1573ba,590b6fdf5,18addb385,d6102714e,6ed615e55,b25cc539c,867f33136,925123497,cf535c210,acf99b190,4967a197f,1908e1ba1,084d80be6,aa0474755]:- grafast@0.1.1-beta.12
- @dataplan/pg@0.0.1-beta.23
- graphile-build@5.0.0-beta.22
- Updated dependencies
[
582bd768f]:- graphile-build@5.0.0-beta.21
- graphile-config@0.0.1-beta.9
- @dataplan/pg@0.0.1-beta.22
- grafast@0.1.1-beta.11
- Updated dependencies
[
3c161f7e1,a674a9923,b7cfeffd1]:- grafast@0.1.1-beta.10
- @dataplan/pg@0.0.1-beta.21
- graphile-build@5.0.0-beta.20
- #2064
437570f97Thanks @benjie! - Fix a bug relating to Global Object Identifiers (specifically in update mutations, but probably elsewhere too) related to early exit. - Updated dependencies
[
437570f97]:- grafast@0.1.1-beta.9
- @dataplan/pg@0.0.1-beta.20
- graphile-build@5.0.0-beta.19
-
#2056
1842af661Thanks @benjie! - Improve exporting of resource options (neater export code) -
Updated dependencies [
1842af661,bd5a908a4]:- graphile-build@5.0.0-beta.18
- grafast@0.1.1-beta.8
- @dataplan/pg@0.0.1-beta.19
-
#2015
5eca6d65aThanks @benjie! - UseinhibitOnNullwhen decoding a spec ID to prevent it being consumed if invalid (e.g. don't allow using a 'Post' node ID to fetch a 'Person' record). -
#1994
ab08cbf9cThanks @benjie! - Introduceinterface SQLable {[$toSQL](): SQL}topg-sql2and use it to simplify SQL fragments in various places. -
#1978
a287a57c2Thanks @benjie! - Breaking:connection()step now accepts configuration object in place of 2nd argument onwards:-return connection($list, nodePlan, cursorPlan); +return connection($list, { nodePlan, cursorPlan });
Feature:
edgeDataPlancan be specified as part of this configuration object, allowing you to associate edge data with your connection edges:return connection($list, { edgeDataPlan($item) { return object({ item: $item, otherThing: $otherThing }); }, }); // ... const plans = { FooEdge: { otherThing($edge) { return $edge.data().get("otherThing"); }, }, };
Feature:
ConnectionStepandEdgeStepgainget()methods, so*Connection.edges,*Connection.nodes,*Connection.pageInfo,*Edge.nodeand*Edge.cursorno longer need plans to be defined. -
#2051
45e10950bThanks @benjie! - Resource options now marked EXPORTABLE after hooks called, enabling more plugins to be exportable. -
#2050
272608c13Thanks @benjie! - Add missing EXPORTABLE (and remove excessive EXPORTABLE) to fix schema exports. -
#2006
bee0a0a68Thanks @benjie! - Adopt improved inflection typings. -
#2019
51a94417fThanks @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. -
Updated dependencies [
357d475f5,30bcd6c12,3551725e7,80836471e,b788dd868,a5c20fefb,1ce08980e,ab08cbf9c,dff4f2535,a287a57c2,2fe56f9a6,fed603d71,ed6e0d278,86168b740,7ad35fe4d,e82e4911e,94a05064e,272608c13,7606a5b87,42ece5aa6,e0d69e518,db8ceed0f,6699388ec,966203504,c1645b249,ed8bbaa3c,a0e82b9c5,14e2412ee,c48d3da7f,57ab0e1e7,8442242e4,bee0a0a68,51a94417f,64ce7b765,cba842357,2fa77d0f2,81d17460c]:- @dataplan/pg@0.0.1-beta.18
- grafast@0.1.1-beta.7
- tamedevil@0.0.0-beta.7
- pg-sql2@5.0.0-beta.6
- graphile-build@5.0.0-beta.17
- pg-introspection@0.0.1-beta.8
- graphile-config@0.0.1-beta.8
-
#1955
6c6be29f1Thanks @benjie! - Steps are now prevented from calling other steps' lifecycle methods. GRAPHILE_ENV is actively encouraged, and falls back to NODE_ENV. -
#1949
179d25b09Thanks @benjie! - Add support for registering PgCodecs via plugins, add support for ltree type, improve error messages, no longer need to set a gather namespace to use cache/state. -
#1958
8315e8d01Thanks @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-exportalong with some fixes and optimizations to improve the exports further. -
Updated dependencies [
9f85c614d,6c6be29f1,6c80c44b7,179d25b09,8315e8d01,9d53dde72,46d8289b4]:- @dataplan/pg@0.0.1-beta.17
- grafast@0.1.1-beta.6
- graphile-build@5.0.0-beta.16
- tamedevil@0.0.0-beta.6
- pg-introspection@0.0.1-beta.7
-
#1933
3a2ea80eeThanks @mattiarossi! -eslint-plugin-graphile-exportnow spots instances ofinputPlan,applyPlanandassertStepso they can be checked - thanks @mattiarossi! -
#1935
8ea67f891Thanks @benjie! - Fix lots of things related to exporting a schema withgraphile-export. -
#1935
e20e66ed7Thanks @benjie! - Make even more of the schema exportable, including handling scalars with no parseLiteral definition. -
Updated dependencies [
49fd8afed,00d32d887,63dd7ea99,c62eee10b,d801c9778,3a2ea80ee,ef44c29b2,8ea67f891,5de3e86eb,e20e66ed7]:- tamedevil@0.0.0-beta.5
- pg-introspection@0.0.1-beta.6
- grafast@0.1.1-beta.5
- graphile-build@5.0.0-beta.15
- @dataplan/pg@0.0.1-beta.16
- pg-sql2@5.0.0-beta.5
- graphile-config@0.0.1-beta.7
-
#1904
5b2db0c75Thanks @benjie! - Add pgRefDetails to scope for some ref-generated fields, to enable plugins to hook them. -
#1905
184773382Thanks @benjie! - Enable specifying the polymorphic subtype a function returns via@returnType MyTypesmart tag. -
Updated dependencies [
555a2be03,1b6c2f636,a2176ea32,886833e2e,f97d7976a]:- @dataplan/pg@0.0.1-beta.15
- tamedevil@0.0.0-beta.4
- grafast@0.1.1-beta.4
- graphile-build@5.0.0-beta.14
- Updated dependencies
[
0df5511ac,7851d89ab,470ee4000]:- graphile-config@0.0.1-beta.6
- pg-introspection@0.0.1-beta.5
- @dataplan/pg@0.0.1-beta.14
- grafast@0.1.1-beta.3
- graphile-build@5.0.0-beta.13
-
#1884
bce0636d4Thanks @benjie! - Fixes multiple pgServices codec name conflicts by prepending the service name if it's not 'main'. -
#1817
f305c3278Thanks @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. -
#1875
3b558e0c1Thanks @enisdenjo! - Consider attribute'sisNotNullflag for polymorphic types -
#1884
2ae8d33aaThanks @benjie! - Fixes missing await which might cause process to exit when something goes wrong during schema building. -
#1885
9e1df08b7Thanks @benjie! - FixorderBy:nullregression -
#1877
8a0cdb95fThanks @benjie! - Move 'declare global' out of 'interfaces.ts' and into 'index.ts' or equivalent. Should make TypeScript more aware of these types. -
#1879
dbd91fdd8Thanks @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 -
#1841
f1d5ad18eThanks @benjie! - Make smart tags parser more forgiving (track parenthesis) -
#1884
c66c3527cThanks @benjie! - List codecs can now have names. -
#1876
9fb5cc06eThanks @enisdenjo! - Specifyfromin@refto apply refs to a single type -
Updated dependencies [
3fdc2bce4,aeef362b5,8a76db07f,f305c3278,8a0cdb95f,dbd91fdd8,c66c3527c,f66cc40b3,f18635a5c,1c9f1c0ed]:- grafast@0.1.1-beta.2
- @dataplan/pg@0.0.1-beta.13
- graphile-build@5.0.0-beta.12
- graphile-config@0.0.1-beta.5
- #1834
2e7fc6449Thanks @benjie! - Fix issue with watch mode where schema omits database resources in some situations. - Updated dependencies
[
49fcb0d58,7aef73319]:- grafast@0.1.1-beta.1
- graphile-config@0.0.1-beta.4
- @dataplan/pg@0.0.1-beta.12
- graphile-build@5.0.0-beta.11
- #1801
2d447a6b4Thanks @benjie! - Fix bug where the owner of a database object wasn't seen as having any privileges. - Updated dependencies
[
2d447a6b4]:- pg-introspection@0.0.1-beta.4
- @dataplan/pg@0.0.1-beta.11
-
#1797
26e0bc726Thanks @benjie! - Fix that smart tags were not copied onto enum codecs. -
Updated dependencies [
26e0bc726]:- @dataplan/pg@0.0.1-beta.11
- Updated dependencies
[
2805edc68]:- pg-sql2@5.0.0-beta.4
- @dataplan/pg@0.0.1-beta.10
- grafast@0.1.1-beta.0
-
#1770
9a84bc6ddThanks @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. -
#1769
b728d7fb9Thanks @benjie! - Fix error message when ref is used with no foreign key. -
#1774
7d55d2c34Thanks @benjie! - Addpreset.gather.pgIdentifierssetting (values: 'qualified' or 'unqualified'); if set to 'unqualified' then we will not add the schema name to table or function identifiers - it's up to you to ensure they're present in thesearch_path(which you can set viapgSettingson a per-request basis). -
Updated dependencies [
4a4d26d87,b2bce88da,861a8a306,9a84bc6dd,b728d7fb9]:- grafast@0.1.1-beta.0
- @dataplan/pg@0.0.1-beta.9
- graphile-build@5.0.0-beta.10
-
#514
c9848f693Thanks @benjie! - Update package.json repository information -
Updated dependencies [
c9848f693,ede1092fe,566983fbd,409bf6071]:- graphile-build@5.0.0-beta.9
- pg-introspection@0.0.1-beta.3
- graphile-config@0.0.1-beta.3
- @dataplan/pg@0.0.1-beta.8
- grafast@0.0.1-beta.8
- tamedevil@0.0.0-beta.3
- pg-sql2@5.0.0-beta.3
- Updated dependencies
[
3700e204f]:- grafast@0.0.1-beta.7
- @dataplan/pg@0.0.1-beta.7
- graphile-build@5.0.0-beta.8
-
#496
c9bfd9892Thanks @benjie! - Update dependencies (sometimes through major versions). -
Updated dependencies [
c9bfd9892,e613b476d]:- graphile-build@5.0.0-beta.7
- pg-introspection@0.0.1-beta.2
- graphile-config@0.0.1-beta.2
- @dataplan/pg@0.0.1-beta.6
- grafast@0.0.1-beta.6
- tamedevil@0.0.0-beta.2
- pg-sql2@5.0.0-beta.2
-
#488
e916b7412Thanks @benjie! - Fix issues with polymorphism when interacting with nodeIds, particularly in mutations and SQL functions. -
#488
109c8ec67Thanks @benjie! - Add new pgTableResource helper and refactor a lot of code to use it, reducing code in many cases -
Updated dependencies [
95e902f54,53186213a,73f1b5218]:- @dataplan/pg@0.0.1-beta.5
- grafast@0.0.1-beta.5
- graphile-build@5.0.0-beta.6
-
#459
d17dd1cd4Thanks @benjie! - Disable mutations for@interface mode:relationaltables. (They shouldn't have been enabled, and they don't work yet.) -
#464
00d026409Thanks @benjie! -@dataplan/pg/adaptors/pgnow addsrawClientproperty which is the underlying Postgres client for use withpgTyped,zapatos, and other libraries that can use a raw postgres client. This is exposed viaNodePostgresPgClientinterface which is a subtype ofPgClient. -
Updated dependencies [
53f0488b1,f9cc88dc4,00d026409]:- @dataplan/pg@0.0.1-beta.4
- grafast@0.0.1-beta.4
- graphile-build@5.0.0-beta.5
-
#454
196e5c1aaThanks @benjie! -@interface mode=single/relationalnow getNodeinterface if the table has a PK.🚨
@interface mode=unionno longer getsNodeinterface unless you also add@behavior node. -
#454
e75bf57ddThanks @benjie! - Automatically register connection types for unionMember unions. -
Updated dependencies [
196e5c1aa]:- graphile-build@5.0.0-beta.4
- @dataplan/pg@0.0.1-beta.3
-
#452
d3ab4e12dThanks @benjie! - Improve error messages with links to more details. -
Updated dependencies [
46cd08aa1,d3ab4e12d]:- grafast@0.0.1-beta.3
- graphile-build@5.0.0-beta.3
- @dataplan/pg@0.0.1-beta.3
- Updated dependencies
[
23bd3c291]:- grafast@0.0.1-beta.2
- @dataplan/pg@0.0.1-beta.2
- graphile-build@5.0.0-beta.2
-
Updated dependencies [
cbd987385]:- @dataplan/pg@0.0.1-beta.1
- grafast@0.0.1-beta.1
- graphile-build@5.0.0-beta.1
- graphile-config@0.0.1-beta.1
- pg-introspection@0.0.1-beta.1
- pg-sql2@5.0.0-beta.1
- tamedevil@0.0.0-beta.1
-
#441
dfefdad3cThanks @benjie! - Change bundling techniques for grafast and @dataplan/pg -
#441
6c1c1a34fThanks @benjie! - Introduce _allRows base inflector used by allRowsConnection and allRowsList -
Updated dependencies [
dfefdad3c]:- @dataplan/pg@0.0.1-alpha.17
- grafast@0.0.1-alpha.16
- graphile-build@5.0.0-alpha.18
-
#433
5491e10b0Thanks @benjie! - Improve error messages from custom string scalars when they cannot be parsed as a string. -
#434
a9561d62dThanks @benjie! - Deprecatepreset.gather.pgJwtType(tuple), instead usepreset.gather.pgJwtTypeswhich expects a string and parses it similar to the PostgreSQL parser (and also allows multiple types to be specified). -
#433
232885703Thanks @benjie! - Change type of pgJwtSecret and pgJwtSignOptions fromanyto the correct types. -
#438
db19ed9c3Thanks @benjie! - When using@interface mode:relational, don't add pointless relationships from concrete type back to abstract or from abstract to related concrete types. -
#438
31e776e03Thanks @benjie! - Fix spurious error relating to connection for@interface type:relational -
#436
055c4e438Thanks @benjie! - Fix inflection of computed column field names in secondary schemas when using the V5 preset. Also, use underscores instead of dashes for the serviceName/schemaName separator for the names of the function resources, so that they can be typed manually rather than having to use string properties likeconst { ["myService-mySchema-my_function_name"]: myFunctionResource } = pgRegistry.pgResources -
#435
cf32f0397Thanks @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). -
#428
57d88b5faThanks @benjie! - Fix bug exporting schema, and importing schema with __assertStep. -
#438
a22830b2fThanks @benjie! - Plugin name now automatically used inprovidesfor every hook, allowing ordering hooks before/after their equivalents in other plugins. -
#428
9695c65f8Thanks @benjie! - Optimize away some unnecessary content from graphile-exported schema -
Updated dependencies [
ea003ca3a,5491e10b0,cf32f0397,57d88b5fa,a22830b2f,9f87a26b1]:- grafast@0.0.1-alpha.15
- graphile-build@5.0.0-alpha.17
- @dataplan/pg@0.0.1-alpha.16
- graphile-config@0.0.1-alpha.7
-
#421
415f436a0Thanks @benjie! -@notNullis now respected in PgAttributesPlugin for outputs as well as inputs. -
#421
5b8e46a8aThanks @benjie! - Breaking for types: movePg*TagstoGraphileBuild.Pg*Tagsfor easier declaration merging -
#421
bb64c090dThanks @benjie! - Newbuild.pgResolveOutputTypehelper exported to aid plugins determining GraphQL output type from a codec (taken from PgAttributesPlugin).
-
#420
c1518fad0Thanks @benjie! - Fix schema so it can run without NodePlugin -
Updated dependencies [
c1518fad0]:- graphile-build@5.0.0-alpha.16
- Updated dependencies
[
d99d666fb]:- grafast@0.0.1-alpha.14
- @dataplan/pg@0.0.1-alpha.15
- graphile-build@5.0.0-alpha.15
-
#417
e7dd2e039Thanks @benjie! -codecis now baked into NodeId handlers (rather than usingcodecNameand looking that up incodecs). All related APIs have thus simplified, e.g. the stepnode(codecs, handler, $id)is nownode(handler, $id), etc. TypeScript should point out any issues you have hopefully. -
#417
f115b6fb2Thanks @benjie! - ExportparseDatabaseIdentifier -
#417
881672305Thanks @benjie! -deepEvalhas been renamed toapplyTransforms -
#418
9ab2adba2Thanks @benjie! - Overhaul peerDependencies and dependencies to try and eliminate duplicate modules error. -
#410
4eda0cd57Thanks @benjie! - Use a single behavior check per location.In the past two weeks I added a few behavior strings like
array:attribute:filterBy(a scoped form ofattribute:filterByto only be used by attributes that were arrays); however I've realised that this will require plugin authors to implement all the same logic to figure out what type an attribute is in order to then see if it has the relevant behavior. This goes against the design of the behavior system, and makes plugin authors' lives harder. So I've reverted this, and instead used theentityBehaviorssystem to add or remove the baseattribute:filterBy(etc) behavior depending on what the type of the attribute is. -
Updated dependencies [
e7dd2e039,620f9e07e,1882e0185,881672305,e5012f9a1,9ab2adba2,47f6f018b,ff4395bfc,502b23340,4eda0cd57]:- graphile-build@5.0.0-alpha.14
- grafast@0.0.1-alpha.13
- @dataplan/pg@0.0.1-alpha.14
-
#406
bfe5997e3Thanks @benjie! - Ability to control via behaviors whether the record type is selectable on CRUD mutation payloads. -
#407
9281a2d88Thanks @benjie! - Exportedversionno longer usesrequire('../package.json')hack, instead the version number is written to a source file at versioning time. Packages now exportversion. -
#406
903c04b3bThanks @benjie! - AddfilterByandorderBybehaviors for each codec type (array, range, composite, binary, scalar) to allow simpler global customization. -
#406
c5eceba07Thanks @benjie! - Incorrect ordering of behaviorsorderBy:array/orderBy:rangefixed ->array:attribute:orderBy/range:attribute:orderBy. -
#407
9281a2d88Thanks @benjie! - More accurate database identifier parser used in a couple places. -
#407
808af8af3Thanks @benjie! - Allow marking relations as@notNull -
#406
9f5a784c6Thanks @benjie! - Introduce TypeScript CIF gatherConfig() to help typing thegatherphase for plugins. -
#408
2849cc3fbThanks @benjie! - Better handle the situation where a node fetcher could not be found. -
#406
51414d328Thanks @benjie! - Add support forbyteadatatype using newBase64EncodedBinaryscalar in GraphQL. -
#406
a298fc893Thanks @benjie! - Fix constraint finding for polymorphism (was theoretically possible to find the wrong constraint). -
#407
1300a9753Thanks @benjie! - Move attribute logic from PgConditionArgumentPlugin to PgAttributesPlugin -
#407
9281a2d88Thanks @benjie! - Possible to set the modifier of an argument type via@arg0modifiersmart tag -
#408
dda361d11Thanks @benjie! - Improve error messages for getInputTypeByName and getOutputTypeByName. -
Updated dependencies [
f5dd38aa3,9281a2d88,675b7abb9,c5050dd28,9f5a784c6,2849cc3fb,8ca9425ed,51414d328,088d83b1d,0d1782869,bc14d488d,dda361d11]:- tamedevil@0.0.0-alpha.4
- grafast@0.0.1-alpha.12
- graphile-build@5.0.0-alpha.13
- @dataplan/pg@0.0.1-alpha.13
- graphile-config@0.0.1-alpha.6
- pg-introspection@0.0.1-alpha.4
-
#402
70b2c3900Thanks @benjie! - pgCodecAttribute behavior now uses attributeName rather than attribute spec in the callback (BREAKING) -
#402
37d829b89Thanks @benjie! - Ability to control whether the nodeId or regular column CRUD mutations are used -
#402
ff91a5660Thanks @benjie! - Addedpostgraphile/presets/relaypreset:- Hides primary key columns from output schema, and includes
id: IDinstead - Hides foreign key columns from output schema, expecting you to use the relation instead
- Hides columns that are part of the primary key from update/delete mutations (but still present for create if the column is writeable - it shouldn't be)
- Hides columns that are part of a foreign key from CRUD mutations/filters,
instead exposes the
IDfor the remote side of the relation - Does not allow ordering by individual primary key columns (though you can
still order by
PRIMARY_KEY_ASC/DESC) - Does not allow ordering by individual foreign key columns
- Turns off the row fetchers that don't use the node
ID - Turns off the CRUD mutations that don't use the node
ID - Functions can now use
@arg0variant nodeIdto indicate the first argument (increase the0for other arguments) should accept a nodeID(this currently only works where the argument type is a table type) - Removes relations from mutation payloads, these should be traversed via the record instead (they're redundant)
Most of these changes are reversible, so for example if you really want to turn back on
Query.userByUsernameyou can do so by adding the+connectionbehavior to the "unique username" constraint on theuserstable. - Hides primary key columns from output schema, and includes
-
#402
644938276Thanks @benjie! - Usefile://URLs in import() to fix compatibility with Windows (e.g. when loadinggraphile.config.mjs) -
#402
339cb005eThanks @benjie! - Remove relations from mutation payloads (unless using V4 preset) - they're redundant. -
Updated dependencies [
644938276,47365f0df]:- graphile-build@5.0.0-alpha.12
- graphile-config@0.0.1-alpha.5
- @dataplan/pg@0.0.1-alpha.12
- grafast@0.0.1-alpha.11
-
#399
409581534Thanks @benjie! - Change many of the dependencies to be instead (or also) peerDependencies, to avoid duplicate modules. -
#396
17fe531d7Thanks @benjie! - pgUnionAll uses a slightly more optimal SQL (where JSON isn't cast to::textand then back to::json) -
#376
326aa99cdThanks @benjie! - Can now give constraints separate forward/backward behaviors -
#400
9238d3ce4Thanks @benjie! - Usefile://URLs in import() to fix compatibility with Windows (e.g. when loadinggraphile.config.mjs). -
#396
b5eb7c490Thanks @benjie! - Cursor pagination over nullable columns should now work, although it is untested. -
#399
976958e80Thanks @benjie! - Plugins can now use build.grafast rather than adding grafast as a peerDependency. -
#396
7573bf374Thanks @benjie! - Address a decent number of TODO/FIXME/etc comments in the codebase. -
#378
95b2ab41eThanks @benjie! - Support for nested arrays via PostgreSQL domains. -
#383
2c8586b36Thanks @benjie! - Change 'objectType.extensions.grafast.Step' to 'objectType.extensions.grafast.assertStep', accept it via object spec, deprecate registerObjectType form that accepts it (pass via object spec instead), improve typings around it. -
#378
6f545683cThanks @benjie! - Fix bug handling domains over composite types. -
#396
b66d2503bThanks @benjie! - hasNextPage (via hasMore) now uses an access plan rather than a lambda plan. -
#401
b868aa63fThanks @benjie! - AddedBuild.dataplanPgso plugins don't need to import this module. -
#396
3caaced6cThanks @benjie! - When fetching a single row, anORDER BYclause will no longer be added. -
#396
9f2507ed9Thanks @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 [
659508371,409581534,4d64ac127,17fe531d7,b7533bd4d,56b52295c,9feb769c2,b5eb7c490,976958e80,7573bf374,95b2ab41e,2c8586b36,8230fcaeb,c43802d74,b118b8f6d,b66d2503b,9008c4f87,47ff7e824,e8c81cd20,3caaced6c,9f2507ed9]:- @dataplan/pg@0.0.1-alpha.11
- graphile-build@5.0.0-alpha.11
- grafast@0.0.1-alpha.10
- pg-introspection@0.0.1-alpha.3
-
#349
a94f11091Thanks @benjie! - Overhaul behavior systemPreviously the behavior system worked during the schema building process, inside the various schema hooks. So looking at the behavior of a
relationmight have looked like:GraphQLObjectType_fields_field(field, build, context) { const relation = context.scope.pgRelationOrWhatever; // Establish a default behavior, e.g. you might give it different default behavior // depending on if the remote table is in the same schema or not const defaultBehavior = someCondition(relation) ? "behavior_if_true" : "behavior_if_false"; // Now establish the user-specified behavior for the entity, inheriting from all the // relevant places. const behavior = getBehavior([ relation.remoteResource.codec.extensions, relation.remoteResource.extensions, relation.extensions ]); // Finally check this behavior string against `behavior_to_test`, being sure to apply // the "schema-time smart defaulting" that we established in `defaultBehavior` above. if (build.behavior.matches(behavior, "behavior_to_test", defaultBehavior)) { doTheThing(); }
This meant that each plugin might treat the behavior of the entity different - for example
postgraphile-plugin-connection-filtermight have a differentsomeCondition()under which the "filter" behavior would apply by default, whereas the built inconditionplugin might have a different one.Moreover, each place needs to know to call
getBehaviorwith the same list of extension sources in the same order, otherwise subtle (or not so subtle) differences in the schema would occur.And finally, because each entity doesn't have an established behavior, you can't ask "what's the final behavior for this entity" because it's dynamic, depending on which plugin is viewing it.
This update fixes all of this; now each entity has a single behavior that's established once. Each plugin can register
entityBehaviorsfor the various behavior entity types (or global behaviors which apply to all entity types if that makes more sense). So the hook code equivalent to the above would now be more like:GraphQLObjectType_fields_field(field, build, context) { const relation = context.scope.pgRelationOrWhatever; // Do the thing if the relation has the given behavior. Simples. if (build.behavior.pgCodecRelationMatches(relation, "behavior_to_test")) { doTheThing(); }
This code is much more to the point, much easier for plugin authors to implement, and also a lot easier to debug since everything has a single established behavior now (except
refs, which aren't really an entity in their own right, but a combination of entities...).These changes haven't changed any of the schemas in the test suite, but they may impact you. This could be a breaking change - so be sure to do a schema diff before/after this.
-
#355
1fe47a2b0Thanks @benjie! - MAJOR BREAKING CHANGE: implicit application of args/input fields has been removed.Previously we would track the fieldArgs that you accessed (via
.get(),.getRaw()or.apply()) and those that you did not access would automatically have theirapplyPlancalled, if they had one. This isn't likely to be particularly useful for pure Grafast users (unless they want to adopt this pattern) but it's extremely useful for plugin-based schemas as it allows plugins to add arguments that can influence their field's plan without having to wrap the field's plan resolver function. This is fairly critical, otherwise each behavior added (first:,condition:,orderBy:,filter:,ignoreArchived:, etc etc) would wrap the plan resolver with another function layer, and they would get messy.However, implicit is rarely good. And it turns out that it severely limited what I wanted to do for improving the
fieldArgsAPIs.I decided to remove this implicit functionality by making it more explicit, so now args/input fields can specify the relevant
autoApplyAfterParent{Plan,SubscribePlan,InputPlan,ApplyPlan}: trueproperty and we'll only apply them at a single level.From a user perspective, little has changed. From a plugin author perspective, if you were relying on the implicit
applyPlanthen you should now add the relevantautoApply*property next to yourapplyPlanmethod. -
#363
bcfffd5feThanks @benjie! - Fix bug causing@foreignKeyrelation to not show up under rare circumstances (by updating PgRelationsPlugin to use codec, not resource, as the primary entity). -
#362
e443db39bThanks @benjie! - Use original case for table resource names. -
Updated dependencies [
339fe20d0,56237691b,ed1982f31,a94f11091,1fe47a2b0,198ac74d5,6878c589c,2ac706f18,77e011294,dad4d4aae,e443db39b]:- tamedevil@0.0.0-alpha.3
- pg-sql2@5.0.0-alpha.3
- grafast@0.0.1-alpha.9
- graphile-build@5.0.0-alpha.10
- graphile-config@0.0.1-alpha.4
- @dataplan/pg@0.0.1-alpha.10
- Updated dependencies
[
dd3ef599c]:- grafast@0.0.1-alpha.8
- @dataplan/pg@0.0.1-alpha.9
- graphile-build@5.0.0-alpha.9
-
#341
2fcbe688cThanks @benjie! - Ensure interfaces with zero implementations don't cause a crash. -
Updated dependencies [
5c9d32264,2fcbe688c,3a984718a,fe9154b23,adc7ae5e0]:- grafast@0.0.1-alpha.7
- @dataplan/pg@0.0.1-alpha.8
- graphile-build@5.0.0-alpha.8
- graphile-config@0.0.1-alpha.3
-
#338
dcc3d0355Thanks @benjie! -@interface mode:unioninterfaces now also gain root fields. -
#338
ca1526b70Thanks @benjie! - Fix startCursor/endCursor for connections using pgUnionAll steps. -
#338
3426b0f4aThanks @benjie! - Fix bugs in pgUnionAll connections relating to PageInfo -
Updated dependencies [
f75926f4b,ca1526b70,3426b0f4a]:- grafast@0.0.1-alpha.6
- @dataplan/pg@0.0.1-alpha.7
- graphile-build@5.0.0-alpha.7
-
#335
ef8432511Thanks @benjie! - Have ref fields support ordering and filtering. -
Updated dependencies [
86e503d78,2850e4732,24822d0dc]:- grafast@0.0.1-alpha.5
- graphile-build@5.0.0-alpha.6
- @dataplan/pg@0.0.1-alpha.6
-
Updated dependencies [
1ea7acdf5]:- @dataplan/pg@0.0.1-alpha.5
- Updated dependencies
[
45dcf3a8f,f34bd5a3c]:- grafast@0.0.1-alpha.4
- @dataplan/pg@0.0.1-alpha.4
- graphile-build@5.0.0-alpha.5
-
#332
faa1c9eaaThanks @benjie! - Adjust dependencies and peerDependencies and peerDependenciesMeta. -
Updated dependencies [
faa1c9eaa]:- graphile-build@5.0.0-alpha.4
- @dataplan/pg@0.0.1-alpha.3
-
7f857950aThanks @benjie! - Upgrade to the latest TypeScript/tslib -
9605165d5Thanks @benjie! - Fix naming conflict that occurs with@enumsmart tag when not using@enumName. NewenumTableEnuminflector. -
Updated dependencies [
21e95326d,87e6c65a7,2389f47ec,82cc01152,e91ee201d,865bec590,7f857950a,d39a5d409]:- graphile-export@0.0.2-alpha.2
- tamedevil@0.0.0-alpha.2
- grafast@0.0.1-alpha.3
- pg-sql2@5.0.0-alpha.2
- @dataplan/pg@0.0.1-alpha.3
- graphile-build@5.0.0-alpha.3
- graphile-config@0.0.1-alpha.2
- pg-introspection@0.0.1-alpha.2
- Updated dependencies
[
3df3f1726]:- grafast@0.0.1-alpha.2
- @dataplan/pg@0.0.1-alpha.2
- graphile-build@5.0.0-alpha.2
-
759ad403dThanks @benjie! - Alpha release - see https://postgraphile.org/news/2023-04-26-version-5-alpha -
Updated dependencies [
759ad403d]:- @dataplan/pg@0.0.1-alpha.1
- grafast@0.0.1-alpha.1
- graphile-build@5.0.0-alpha.1
- graphile-config@0.0.1-alpha.1
- graphile-export@0.0.2-alpha.1
- pg-introspection@0.0.1-alpha.1
- pg-sql2@5.0.0-alpha.1
- tamedevil@0.0.0-alpha.1
- #297
b4eaf89f4Thanks @benjie! - AsyncHooks can now execute synchronously if all registered hooks are synchronous. May impact ordering of fields/types in GraphQL schema. - Updated dependencies
[
8d270ead3,b4eaf89f4]:- grafast@0.0.1-1.3
- graphile-config@0.0.1-1.2
- @dataplan/pg@0.0.1-1.3
- graphile-build@5.0.0-1.3
- Updated dependencies
[
7dcb0e008]:- grafast@0.0.1-1.2
- @dataplan/pg@0.0.1-1.2
- graphile-build@5.0.0-1.2
-
#279
2df36c5a1Thanks @benjie! -descriptionmoved out ofextensionsto live directly on all the relevant entities. -
#287
c5d89d705Thanks @benjie! - Fix the type definition of GatherHooks to allow plugins to indicate individual gather hook ordering. -
#279
a73f9c709Thanks @benjie! -PgConnectionArgFirstLastBeforeAfterPluginis 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.orderByNullsLastis nowconfig.schema.pgOrderByNullsLastfor consistency (V4 preset users are unaffected). Lots of field scopes ingraphile-build-pghave been updated to incorporatefieldinto their names. -
#260
d5312e6b9Thanks @benjie! - TypeScript v5 is now required -
#259
c22dcde7bThanks @benjie! - RenamedrecordTypecodec factory torecordCodec.recordCodec()now only accepts a single object argument. RenamedenumTypecodec factory toenumCodec.enumCodec()now only accepts a single object argument. RenamelistOfTypetolistOfCodec.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
bd37be707Thanks @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. -
#260
96b0bd14eThanks @benjie! -PgSourcehas been renamed toPgResource,PgTypeCodectoPgCodec,PgEnumTypeCodectoPgEnumCodec,PgTypeColumntoPgCodecAttribute(and similar for related types/interfaces).sourcehas been replaced byresourcein various of the APIs where it relates to aPgResource.PgSourceBuilderis no more, instead being replaced withPgResourceOptionsand being built into the finalPgResourcevia the newmakeRegistryBuilder/makeRegistryfunctions.build.inputno longer contains thepgSourcesdirectly, insteadbuild.input.pgRegistry.pgResourcesshould 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
PgRegistryPluginplugin in the default preset. The only plugin that uses themainmethod in thegatherphase is nowPgRegistryPlugin- if you are using themainfunction 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
lexicographicSortSchemaon 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,PgUpdateStepandPgDeleteStepnow all accept the resource as their single type parameter rather than accepting the 4 generics they did previously.PgClassExpressionStepnow accepts just a codec and a resource as generics.PgResourceandPgCodechave gained a newTName extends stringgeneric 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.
-
#271
d951897eeThanks @benjie! - Add extensions.pg to Postgres function resources (makes it easier for plugins to hook them). -
#286
366b166dcThanks @benjie! - Add detection for@refthat is missingsingular, fix docs and test schema and add tests for same. -
#271
261eb520bThanks @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 relatedpgConfigterms such asmakePgConfig->makePgService,MakePgConfigOptions->MakePgServiceOptions, etc) - see yourgraphile.config.tsor equivalent file- All
*:source:*behaviors are now*:resource:*behaviors (use regexp/:source\b|\bsource:[a-z$]/to find the places that need updating) PgDatabaseConfiguration->PgServiceConfigurationdatabaseName->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.fromPgSelectPlanJoin::source->PgSelectPlanJoin.fromhelpers.pgIntrospection.getDatabase->helpers.pgIntrospection.getServicehelpers.pgIntrospection.getExecutorForDatabase->helpers.pgIntrospection.getExecutorForService
-
#268
a14cf5f4cThanks @benjie! - PgV4NoIgnoreIndexesPlugin is now PgIndexBehaviorsPlugin, moved to graphile-build-pg, and is enabled by default -
Updated dependencies [
2df36c5a1,c5d89d705,a73f9c709,ae304b33c,ef42d717c,d5312e6b9,22ec50e36,0f4709356,c22dcde7b,bd37be707,f8954fb17,96b0bd14e,f93c79b94,fbf1da26a,53e164cbc,c564825f3,261eb520b,395b4a2dd]:- @dataplan/pg@0.0.1-1.1
- graphile-build@5.0.0-1.1
- grafast@0.0.1-1.1
- pg-introspection@0.0.1-1.1
- graphile-config@0.0.1-1.1
- graphile-export@0.0.2-1.1
- tamedevil@0.0.0-1.1
- pg-sql2@5.0.0-1.1
- #257
89d16c972Thanks @benjie! - PgClassSinglePlan is now enforced, users will be informed if plans return a step incompatible with the given GraphQL object type. - Updated dependencies
[
89d16c972,8f323bdc8,9e7183c02,fce77f40e]:- grafast@0.0.1-0.23
- pg-sql2@5.0.0-0.4
- @dataplan/pg@0.0.1-0.28
- graphile-build@5.0.0-0.29
-
#233
a50bc5be4Thanks @benjie! - Introduce new GraphQLObjectType_fields_field_args_arg and GraphQLInterfaceType_fields_field_args_arg hooks to resolve some plugin ordering issues. -
#233
11e7c12c5Thanks @benjie! - Solve mutation issue in plugin ordering code which lead to heisenbugs. -
#233
2f50a633aThanks @benjie! - Fix a bug where plugin ordering could result in update mutations not being created. -
#233
005e5cea0Thanks @benjie! - Eradicate PgSmartCommentsPlugin, it is no longer needed. Solves some plugin ordering issues. -
Updated dependencies [
a50bc5be4,6fb7ef449,11e7c12c5]:- graphile-build@5.0.0-0.28
- graphile-config@0.0.1-0.6
- grafast@0.0.1-0.22
- @dataplan/pg@0.0.1-0.27
-
#229
13cfc7501Thanks @benjie! - pgConfig.listen is no more; it was redundant versus PgSubscriber. Have migrated PgIntrospectionPlugin to use PgSubscriber instead. -
#229
ac6137bb6Thanks @benjie! - 🚨 PgRBACPlugin is now included in the defaultgraphile-build-pg(and thus PostGraphile amber) preset. Users of the V4 preset are unaffected. -
Updated dependencies [
f5a04cf66,13cfc7501,b9a2236d4]:- grafast@0.0.1-0.21
- @dataplan/pg@0.0.1-0.26
- graphile-build@5.0.0-0.27
- Updated dependencies [
aac8732f9]:- grafast@0.0.1-0.20
- @dataplan/pg@0.0.1-0.25
- graphile-build@5.0.0-0.26
- Updated dependencies
[
397e8bb40]:- grafast@0.0.1-0.19
- @dataplan/pg@0.0.1-0.24
- graphile-build@5.0.0-0.25
- Updated dependencies
[
4c2b7d1ca,2abc58cf6,c8a56cdc8,df8c06657]:- grafast@0.0.1-0.18
- graphile-build@5.0.0-0.24
- @dataplan/pg@0.0.1-0.23
-
#218
f2c1423fbThanks @benjie! - Option for@foreignKeysmart tag to have unique auto-created for it to ease transition from V4:{ gather: { pgFakeConstraintsAutofixForeignKeyUniqueness: true } } -
#219
b58f5dfacThanks @benjie! - RenameGraphileBuild.GraphileBuildGatherOptionstoGraphileBuild.GatherOptions. RenameGraphileBuild.GraphileBuildInflectionOptionstoGraphileBuild.InflectionOptions. -
Updated dependencies [
b58f5dfac]:- graphile-build@5.0.0-0.23
- Updated dependencies [
f48860d4f]:- grafast@0.0.1-0.17
- graphile-build@5.0.0-0.22
- @dataplan/pg@0.0.1-0.22
-
#214
3ed7d3349Thanks @benjie! - @uniqueKey smart tag now converted via V4 preset to @unique. -
Updated dependencies [
7e3bfef04,df89aba52]:- @dataplan/pg@0.0.1-0.21
- grafast@0.0.1-0.16
- graphile-build@5.0.0-0.21
a8d26b30a-ignoreReplaceIfNotExistsnow truly ignores replacement inflectors. Better handle disabled NodePlugin.
5812ad277- Deal better with NodePlugin being disabled.
-
#210
2fb5001b4Thanks @benjie! - retryOnInitFail implemented, and bug in introspection cache on error resolved. -
#210
2bd4b619eThanks @benjie! - Addextensions.pg = { databaseName, schemaName, name }to various DB-derived resources (codecs, sources, etc); this replaces theoriginalNametemporary solution that we had previously. -
#210
b523118feThanks @benjie! - Replace BaseGraphQLContext with Grafast.Context throughout. -
Updated dependencies [
2fb5001b4,2bd4b619e,b523118fe]:- graphile-build@5.0.0-0.20
- @dataplan/pg@0.0.1-0.20
- grafast@0.0.1-0.15
- #206
851b78ef2Thanks @benjie! - Grafserv now masks untrusted errors by default; trusted errors are constructed via GraphQL's GraphQLError or Grafast's SafeError. - Updated dependencies
[
d76043453,afa0ea5f6,92c2378f2,851b78ef2,384b3594f]:- grafast@0.0.1-0.14
- @dataplan/pg@0.0.1-0.19
- graphile-build@5.0.0-0.19
- Updated dependencies [
e5b664b6f]:- @dataplan/pg@0.0.1-0.17
- grafast@0.0.1-0.13
- graphile-build@5.0.0-0.17
- Updated dependencies
[
4f5d5bec7,fb40bd97b,a1158d83e,25f5a6cbf]:- @dataplan/pg@0.0.1-0.16
- grafast@0.0.1-0.12
- graphile-build@5.0.0-0.16
-
0ab95d0b1- Update sponsors. -
#190
652cf1073Thanks @benjie! - 🚨 Breaking changes around types and postgres configuration:GraphileBuild.GraphileResolverContextrenamed toGrafast.ContextGraphileConfig.GraphQLRequestContextrenamed toGrafast.RequestContextGrafast.PgDatabaseAdaptorOptionsrenaed toGraphileConfig.PgDatabaseAdaptorOptions@dataplan/pg/adaptors/node-postgresis now@dataplan/pg/adaptors/pgdue 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->makePgAdaptorWithPgClientpostgraphileCLI will now try and respect the adaptor stated in your preset when overriding connection arguments- Removed
Grafast.RequestContext.httpRequestand instead useGrafast.RequestContext.node.req/res; all server adaptors should implement this if appropriate
-
#192
80091a8e0Thanks @benjie! - - Conflicts inpgConfigs(e.g. multiple sources using the same 'name') now detected and output- Fix defaults for
pgSettingsKeyandwithPgClientKeybased on config name makePgConfignow allows passingpgSettingscallback andpgSettingsForIntrospectionconfig object- Multiple postgres sources now works nicely with multiple
makePgConfigcalls
- Fix defaults for
-
Updated dependencies [
0ab95d0b1,af9bc38c8,4783bdd7c,652cf1073,80091a8e0]:- @dataplan/pg@0.0.1-0.15
- grafast@0.0.1-0.11
- graphile-build@5.0.0-0.15
- graphile-config@0.0.1-0.5
- pg-introspection@0.0.1-0.3
- pg-sql2@5.0.0-0.3
- tamedevil@0.0.0-0.4
-
72bf5f535- Overhaul the behavior system (see https://postgraphile.org/postgraphile/next/behavior).- Adds
schema.defaultBehaviorconfiguration option to save having to write a plugin for such a simple task - Changes a bunch of behavior strings:
(query|singularRelation|manyRelation|queryField|typeField):(list|connection|single)->$1:source:$2(e.g.query:list->query:source:list)
- Checks for more specific behaviors, e.g.
source:updateorconstraint:source:updateorattribute:updaterather than justupdate - Updates every change to
getBehaviorso that it follows the relevant chain (e.g. codec -> source -> relation for relations, similar for other types) - More helpful error message when
-insertprevents functions with input arguments working - Throw an error if you try and use "create" scope (because we use insert/update/delete not create/update/delete)
- Adds
-
Updated dependencies [
72bf5f535]:- graphile-build@5.0.0-0.14
- Updated dependencies
[
842f6ccbb]:- graphile-config@0.0.1-0.4
- grafast@0.0.1-0.10
- graphile-build@5.0.0-0.13
- @dataplan/pg@0.0.1-0.14
-
#183
ebb24895cThanks @benjie! - Fix bug when handling stable void functions -
#181
d3cba220cThanks @benjie! -*FieldNamesmart tags are now used verbatim rather than being piped throughinflection.camelCase(...)- you've explicitly stated a 'field name' so we should use that. This may be a breaking change for you if your field names are currently different before/after they are camelCase'd. -
#183
3eb9da95eThanks @benjie! - Fix potential construction loop on failure to construct a type -
Updated dependencies [
3eb9da95e]:- graphile-build@5.0.0-0.12
-
#178
1b040b3baThanks @benjie! -@omitand similar smart tags are now processed on@foreignKeyand other fake constraints. -
#177
6be68a53eThanks @benjie! -@foreignFieldNamesmart tag is now fed into theinflection.connectionField(...)orinflection.listField(...)inflector as appropriate. If you are using@foreignSimpleFieldNameyou may be able to delete that now; alternatively you should consider renaming@foreignFieldNameto@foreignConnectionFieldNamefor consistency. -
#176
11d6be65eThanks @benjie! - Fix issue with plugin versioning. Add more TSDoc comments. New getTerminalWidth() helper. -
Updated dependencies [
19e2961de,11d6be65e]:- graphile-config@0.0.1-0.3
- grafast@0.0.1-0.9
- graphile-build@5.0.0-0.11
- @dataplan/pg@0.0.1-0.13
- Updated dependencies
[
208166269]:- grafast@0.0.1-0.8
- @dataplan/pg@0.0.1-0.12
- graphile-build@5.0.0-0.10
-
af9f11f28Thanks @benjie! - 'preset.pgSources' renamed to 'preset.pgConfigs' to avoid confusion with PgSource class and 'input.pgSources' used for build. -
6ebe3a13eThanks @benjie! - Enable omitting update/delete mutations using behaviors on unique constraints. -
0e440a862Thanks @benjie! - Add new--superuser-connectionoption to allow installing watch fixtures as superuser. -
Updated dependencies [
6ebe3a13e,0e440a862]:- graphile-build@5.0.0-0.9
- @dataplan/pg@0.0.1-0.11
677c8f5fc- Create new getTags() introspection helper and use it. Rename GraphileBuild.GraphileBuildSchemaOptions to GraphileBuild.SchemaOptions. Fix a couple minor inflection bugs. Add some missing descriptions. Fix the initial inflection types to not leak implementation details. Fix inflectors to use ResolvedPreset rather than Preset.- Updated dependencies [
4ca7fce12,677c8f5fc]:- tamedevil@0.0.0-0.3
- graphile-build@5.0.0-0.8
- pg-introspection@0.0.1-0.2
- grafast@0.0.1-0.7
- @dataplan/pg@0.0.1-0.10
- Updated dependencies [
c4213e91d]:- @dataplan/pg@0.0.1-0.9
-
9b296ba54- More secure, more compatible, and lots of fixes across the monorepo -
Updated dependencies [
9b296ba54]:- @dataplan/pg@0.0.1-0.8
- grafast@0.0.1-0.6
- graphile-build@5.0.0-0.7
- graphile-config@0.0.1-0.2
- pg-introspection@0.0.1-0.1
- pg-sql2@5.0.0-0.2
- tamedevil@0.0.0-0.2
-
cd37fd02a- Introduce new tamedevil package for managing JIT code -
Updated dependencies [
cd37fd02a]:- grafast@0.0.1-0.5
- tamedevil@0.0.0-0.1
- @dataplan/pg@0.0.1-0.7
- graphile-build@5.0.0-0.6
- Updated dependencies [
768f32681]:- @dataplan/pg@0.0.1-0.6
- grafast@0.0.1-0.4
- graphile-build@5.0.0-0.5
- graphile-export@0.0.2-0.4
- Updated dependencies [
9ebe3d860]:- @dataplan/pg@0.0.1-0.5
- Updated dependencies [
bf83f591d]:- @dataplan/pg@0.0.1-0.4
-
d11c1911c- Fix dependencies -
Updated dependencies [
d11c1911c]:- @dataplan/pg@0.0.1-0.3
- grafast@0.0.1-0.3
- graphile-build@5.0.0-0.4
- graphile-config@0.0.1-0.1
- graphile-export@0.0.2-0.3
- Updated dependencies [
25037fc15]:- @dataplan/pg@0.0.1-0.2
- grafast@0.0.1-0.2
- graphile-build@5.0.0-0.3
- graphile-export@0.0.2-0.2
- Updated dependencies [
55f15cf35]:- @dataplan/pg@0.0.1-0.1
- grafast@0.0.1-0.1
- graphile-build@5.0.0-0.2
- graphile-export@0.0.2-0.1