Skip to content

Commit

Permalink
Revert "Revert "Revert "pagination limit""" (#531)
Browse files Browse the repository at this point in the history
Revert "Revert "Revert "pagination limit"" (#530)"

This reverts commit b66e40f.
  • Loading branch information
boudra authored Apr 18, 2024
1 parent b66e40f commit 331255d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# (ab)use the development environment until we build on github
- name: Build and test
run: |
flyctl -c fly.staging.toml deploy --remote-only --build-only
flyctl -c fly.development.toml deploy --remote-only --build-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

Expand Down
61 changes: 0 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"license": "ISC",
"dependencies": {
"@graphile-contrib/pg-simplify-inflector": "^6.1.0",
"@graphile/pro": "^1.0.4",
"@isaacs/ttlcache": "^1.4.1",
"@sentry/node": "^7.51.0",
"@teamawesome/tiny-batch": "^1.0.7",
Expand Down
12 changes: 5 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ import { throttle } from "throttle-debounce";
import * as pg from "pg";
const { Pool, types } = pg.default;

import { postgraphile, makePluginHook } from "postgraphile";
import { postgraphile } from "postgraphile";
import ConnectionFilterPlugin from "postgraphile-plugin-connection-filter";
import PgSimplifyInflectorPlugin from "@graphile-contrib/pg-simplify-inflector";
import GraphilePro from "@graphile/pro";

import { createPassportProvider, PassportProvider } from "./passport/index.js";

Expand Down Expand Up @@ -263,8 +262,6 @@ async function main(): Promise<void> {
...(config.httpServerWaitForSync ? [indexChainsPromise] : []),
]);

const pluginHook = makePluginHook([GraphilePro.default]);

// TODO: use read only connection, use separate pool?
const graphqlHandler = postgraphile(
databaseConnectionPool,
Expand All @@ -278,7 +275,6 @@ async function main(): Promise<void> {
disableDefaultMutations: true,
dynamicJson: true,
bodySizeLimit: "100kb", // response body limit
pluginHook,
// disableQueryLog: false,
// allowExplain: (req) => {
// return true;
Expand Down Expand Up @@ -310,8 +306,10 @@ async function main(): Promise<void> {
],
},

defaultPaginationCap: 1000,
graphqlDepthLimit: 4,
// TODO: buy pro version?
// defaultPaginationCap: 1000,
// readOnlyConnection: true,
// graphqlDepthLimit: 2
}
);

Expand Down

0 comments on commit 331255d

Please sign in to comment.