Skip to content

Commit 5e6c801

Browse files
committed
Start updating the README
1 parent b2ac415 commit 5e6c801

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed

README.md

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,24 @@
44

55
Adds a powerful suite of filtering capabilities to a PostGraphile schema.
66

7-
> **Warning:** Use of this plugin with the default options may make it **astoundingly trivial** for a malicious actor (or a well-intentioned application that generates complex GraphQL queries) to overwhelm your database with expensive queries. See the [Performance and Security](https://github.com/graphile-contrib/postgraphile-plugin-connection-filter#performance-and-security) section below for details.
7+
> [!WARNING]
8+
> Use of this plugin with the default options may make it **astoundingly trivial** for a malicious actor (or a well-intentioned application that generates complex GraphQL queries) to overwhelm your database with expensive queries. See the [Performance and Security](https://github.com/graphile-contrib/postgraphile-plugin-connection-filter#performance-and-security) section below for details.
89
910
## Usage
1011

11-
Requires PostGraphile v4.5.0 or higher.
12-
1312
Install with:
1413

1514
```
1615
yarn add postgraphile postgraphile-plugin-connection-filter
1716
```
1817

19-
for PostGraphile v5 (beta):
20-
21-
```
22-
yarn add postgraphile@beta postgraphile-plugin-connection-filter@beta
23-
```
24-
25-
CLI usage via `--append-plugins`:
26-
27-
```
28-
postgraphile --append-plugins postgraphile-plugin-connection-filter -c postgres://localhost/my_db ...
29-
```
30-
31-
Library usage via `appendPlugins`:
32-
33-
```ts
34-
import ConnectionFilterPlugin from "postgraphile-plugin-connection-filter";
35-
// or: const ConnectionFilterPlugin = require("postgraphile-plugin-connection-filter");
36-
37-
const middleware = postgraphile(DATABASE_URL, SCHEMAS, {
38-
appendPlugins: [ConnectionFilterPlugin],
39-
});
40-
```
41-
42-
Config example for PostGraphile v5 (beta), `graphile.config.mjs`:
18+
Add to your `graphile.config.ts` configuration:
4319

4420
```ts
45-
import ConnectionFilterPlugin from "postgraphile-plugin-connection-filter";
21+
import { PostGraphileConnectionFilterPreset } from "postgraphile-plugin-connection-filter";
4622

4723
const preset = {
48-
extends: [ConnectionFilterPlugin.PostGraphileConnectionFilterPreset],
24+
extends: [PostGraphileConnectionFilterPreset],
4925
};
5026

5127
export default preset;

0 commit comments

Comments
 (0)