From 179d737e123fddc471f70b38fdf5cad536683800 Mon Sep 17 00:00:00 2001 From: Dan Debrunner Date: Tue, 16 Dec 2025 08:25:25 -0500 Subject: [PATCH 1/3] chore: add totalEdges for Postgres snippet --- dbquery/pagination/api.graphql | 5 +++++ dbquery/pagination/operations.graphql | 1 + 2 files changed, 6 insertions(+) diff --git a/dbquery/pagination/api.graphql b/dbquery/pagination/api.graphql index 1c7b752..24dcd4c 100644 --- a/dbquery/pagination/api.graphql +++ b/dbquery/pagination/api.graphql @@ -26,6 +26,11 @@ the starting point). type CustomerConnection { edges: [CustomerEdge] pageInfo: PageInfo! + + """ + Total number of edges, may be `null` if the value cannot be determined. + """ + totalEdges: Int } """ diff --git a/dbquery/pagination/operations.graphql b/dbquery/pagination/operations.graphql index fc4852c..239c741 100644 --- a/dbquery/pagination/operations.graphql +++ b/dbquery/pagination/operations.graphql @@ -11,5 +11,6 @@ query Customers($first: Int!, $after: String = "") { endCursor hasNextPage } + totalEdges } } From 91a04047092b22a345af3abae3f92e4790aa20d1 Mon Sep 17 00:00:00 2001 From: Dan Debrunner Date: Tue, 16 Dec 2025 08:28:46 -0500 Subject: [PATCH 2/3] Update api.graphql --- dbquery/pagination/api.graphql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbquery/pagination/api.graphql b/dbquery/pagination/api.graphql index 24dcd4c..f127aa9 100644 --- a/dbquery/pagination/api.graphql +++ b/dbquery/pagination/api.graphql @@ -28,7 +28,7 @@ type CustomerConnection { pageInfo: PageInfo! """ - Total number of edges, may be `null` if the value cannot be determined. + Total number of edges, will be `null` if the value cannot be determined. """ totalEdges: Int } From 4a742b5b450d04a7b12b6a614bc405958f7c5b37 Mon Sep 17 00:00:00 2001 From: Dan Debrunner Date: Tue, 16 Dec 2025 08:32:10 -0500 Subject: [PATCH 3/3] test: add totalEdges response values --- dbquery/pagination/tests/Test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dbquery/pagination/tests/Test.js b/dbquery/pagination/tests/Test.js index 6c35d31..93002f3 100644 --- a/dbquery/pagination/tests/Test.js +++ b/dbquery/pagination/tests/Test.js @@ -41,7 +41,8 @@ describe(testDescription, function () { pageInfo: { hasNextPage: true, endCursor: CURSOR - } + }, + totalEdges: 10 } }, }, @@ -72,7 +73,8 @@ describe(testDescription, function () { pageInfo: { endCursor: "eyJjIjoiTDpRdWVyeTpjdXN0b21lcnMiLCJvIjozfQ==", hasNextPage: true - } + }, + totalEdges: 10 } }, },