Files
grecia/spec
Javi Martín 5f80a75161 Limit GraphQL queries complexity once again
We accidentally removed the code for maximum complexity in commit
c984e666f. As mentioned in the documentation:

> The main risk factor is multiple collections of resources being
> requested in the same query.

We reject these requests by limiting the complexity.

The `max_complexity` option depends on the page size being set. Without
it, we get an error:

```
Can't calculate complexity for User.public_debates, no `first:`,
`last:`, `max_page_size` or `default_max_page_size`
```

So we're also adding a default max page size.

Note that the documentation mentioned that the default page size was 25.
However, before commit c984e666f, we were using a page size of 50 in
some cases. We're going with the one mentioned in the documentation
since we don't fully understand the old code.
2024-09-30 12:06:42 +02:00
..
2024-09-30 11:35:15 +02:00
2024-09-30 11:35:15 +02:00
2024-06-17 16:48:37 +02:00
2023-11-23 18:21:29 +01:00