Skip to content

Commit 2205f0e

Browse files
authored
Make generic filtering warning more eyecatching
1 parent e648915 commit 2205f0e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/pages/postgraphile/filtering.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,21 @@ adding fields using [custom queries](/postgraphile/custom-queries/),
2525
[makeExtendSchemaPlugin](/postgraphile/make-extend-schema-plugin/).
2626

2727
You can also augment PostGraphile's existing connections using custom
28-
[Graphile Engine plugins](/postgraphile/extending-raw/), such as:
28+
[Graphile Engine plugins](/postgraphile/extending-raw/), such as the following:
2929

3030
#### Filter Plugin
3131

32+
> 🚨**BEWARE**🚨: adding powerful generic filtering capabilities to your
33+
> GraphQL API is strongly discouraged, not just by Benjie (the maintainer of
34+
> PostGraphile) but also
35+
> [by Lee Byron](https://twitter.com/leeb/status/1004655619431731200) (one of
36+
> the inventors of GraphQL) and various other experts in the GraphQL ecosystem.
37+
> It is **strongly advised** that you add only very specific filters using one of
38+
> the techniques above (and that you make their inputs as simple as possible)
39+
> rather than using a generic filtering plugin like this. Not heeding this advice
40+
> may lead to very significant performance issues down the line that are very
41+
> hard for you to dig your way out of.
42+
3243
A very popular plugin is Matt Bretl's connection-filter plugin, located at
3344
[https://github.com/graphile-contrib/postgraphile-plugin-connection-filter](https://github.com/graphile-contrib/postgraphile-plugin-connection-filter).
3445
This adds a `filter` argument to connections that enables you to use advanced

0 commit comments

Comments
 (0)