Created
July 29, 2022 00:45
-
-
Save stevehenderson/8329ca70e1e90c06ee5adea9b4db52f4 to your computer and use it in GitHub Desktop.
Patch pg-graphql 30 row limit (pg_graphql--0.3.3.sql)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pg_graphql--0.3.3.sql b/pg_graphql--0.3.3.sql | |
index 1c7e735..c35ca13 100644 | |
--- a/pg_graphql--0.3.3.sql | |
+++ b/pg_graphql--0.3.3.sql | |
@@ -3226,19 +3226,19 @@ begin | |
order by | |
%s | |
limit | |
- least(%s, 30) + 1 | |
+ least(%s, 150) + 1 | |
), | |
xyz as ( | |
select | |
*, | |
- max(%I.__page_row_num_for_page_size) over () > least(%s, 30) as __has_next_page, | |
+ max(%I.__page_row_num_for_page_size) over () > least(%s, 150) as __has_next_page, | |
row_number() over () as __page_row_num | |
from | |
xyz_maybe_extra as %I | |
order by | |
%s | |
limit | |
- least(%s, 30) | |
+ least(%s, 150) | |
) | |
select | |
jsonb_build_object(%s) | |
@@ -3328,11 +3328,11 @@ begin | |
end | |
), | |
-- limit | |
- coalesce(first_, last_, '30'), | |
+ coalesce(first_, last_, '150'), | |
-- has_next_page block namex | |
block_name, | |
-- xyz_has_next_page limit | |
- coalesce(first_, last_, '30'), | |
+ coalesce(first_, last_, '150'), | |
-- xyz | |
block_name, | |
graphql.order_by_clause( | |
@@ -3342,7 +3342,7 @@ begin | |
else column_orders | |
end | |
), | |
- coalesce(first_, last_, '30'), | |
+ coalesce(first_, last_, '150'), | |
-- JSON selects | |
concat_ws(', ', total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pg 0.4.0