From c6607986aabcbc1bfb61564a1e90a069b70ed3bf Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 6 Mar 2026 16:04:18 +0000 Subject: [PATCH 1/5] Export PgRootStep type --- grafast/dataplan-pg/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grafast/dataplan-pg/src/index.ts b/grafast/dataplan-pg/src/index.ts index 0a430e0c52..c72b2445ad 100644 --- a/grafast/dataplan-pg/src/index.ts +++ b/grafast/dataplan-pg/src/index.ts @@ -145,6 +145,7 @@ import type { PgInsertSingleQueryBuilder } from "./steps/pgInsertSingle.ts"; import { pgInsertSingle, PgInsertSingleStep } from "./steps/pgInsertSingle.ts"; import type { PgGroupDetails, + PgRootStep, PgSelectArgumentDigest, PgSelectArgumentRuntimeValue, PgSelectArgumentSpec, @@ -288,6 +289,7 @@ export type { PgResourceParameter, PgResourceUnique, PgResourceUniqueExtensions, + PgRootStep, PgSelectArgumentDigest, PgSelectArgumentRuntimeValue, PgSelectArgumentSpec, From 1400580552006675ca3ce47e0e75270e9feb29b1 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 6 Mar 2026 16:04:38 +0000 Subject: [PATCH 2/5] Allow PgRootStep to accept a PgTypedStep (and no codec) --- grafast/dataplan-pg/src/steps/pgSelect.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/grafast/dataplan-pg/src/steps/pgSelect.ts b/grafast/dataplan-pg/src/steps/pgSelect.ts index 5b583c48e9..b288a14c3b 100644 --- a/grafast/dataplan-pg/src/steps/pgSelect.ts +++ b/grafast/dataplan-pg/src/steps/pgSelect.ts @@ -221,6 +221,7 @@ export type PgSelectMode = "normal" | "aggregate" | "mutation"; * but not guaranteed. */ export type PgRootStep = Step & { + placeholder(step: PgTypedStep): SQL; placeholder(step: Step, codec: PgCodec): SQL; deferredSQL($step: Step): SQL; }; From f063e241dd64c0322f1480c36945920733ccf29a Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 6 Mar 2026 16:04:49 +0000 Subject: [PATCH 3/5] Export sql/SQL from graphile-build-pg --- graphile-build/graphile-build-pg/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphile-build/graphile-build-pg/src/index.ts b/graphile-build/graphile-build-pg/src/index.ts index 981db15c9a..77829b876b 100644 --- a/graphile-build/graphile-build-pg/src/index.ts +++ b/graphile-build/graphile-build-pg/src/index.ts @@ -191,3 +191,5 @@ export { getWithPgClientFromPgService, withPgClientFromPgService, } from "@dataplan/pg"; +export type { SQL } from "pg-sql2"; +export { sql } from "pg-sql2"; From 45554280b59d955e4e1e2a589d1f87717f4e48a0 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Mon, 9 Mar 2026 08:58:46 +0000 Subject: [PATCH 4/5] docs(changeset): Re-export `sql` and `SQL` from `graphile-build-pg`. --- .changeset/chatty-actors-scream.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/chatty-actors-scream.md diff --git a/.changeset/chatty-actors-scream.md b/.changeset/chatty-actors-scream.md new file mode 100644 index 0000000000..d71354833f --- /dev/null +++ b/.changeset/chatty-actors-scream.md @@ -0,0 +1,5 @@ +--- +"graphile-build-pg": patch +--- + +Re-export `sql` and `SQL` from `graphile-build-pg`. From be429b8d2ce7e9923af076cb89d8483fa44e6ae0 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Mon, 9 Mar 2026 08:59:18 +0000 Subject: [PATCH 5/5] docs(changeset): Export `PgRootStep` interface, and improve said interface to support `placeholder` of a `PgTypedStep` (with no codec necessary). --- .changeset/afraid-baboons-hunt.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/afraid-baboons-hunt.md diff --git a/.changeset/afraid-baboons-hunt.md b/.changeset/afraid-baboons-hunt.md new file mode 100644 index 0000000000..a5b143fd2d --- /dev/null +++ b/.changeset/afraid-baboons-hunt.md @@ -0,0 +1,6 @@ +--- +"@dataplan/pg": patch +--- + +Export `PgRootStep` interface, and improve said interface to support +`placeholder` of a `PgTypedStep` (with no codec necessary).