File tree 3 files changed +33
-28
lines changed
3 files changed +33
-28
lines changed Original file line number Diff line number Diff line change 1
1
CHANGELOG
2
2
=========
3
3
4
+ 0.258.0 - 2025-01-12
5
+ --------------------
6
+
7
+ Add the ability to override the "max results" a relay's connection can return on
8
+ a per-field basis.
9
+
10
+ The default value for this is defined in the schema's config, and set to ` 100 `
11
+ unless modified by the user. Now, that per-field value will take precedence over
12
+ it.
13
+
14
+ For example:
15
+
16
+ ``` python
17
+ @strawerry.type
18
+ class Query :
19
+ # This will still use the default value in the schema's config
20
+ fruits: ListConnection[Fruit] = relay.connection()
21
+
22
+ # This will reduce the maximum number of results to 10
23
+ limited_fruits: ListConnection[Fruit] = relay.connection(max_results = 10 )
24
+
25
+ # This will increase the maximum number of results to 10
26
+ higher_limited_fruits: ListConnection[Fruit] = relay.connection(max_results = 10_000 )
27
+ ```
28
+
29
+ Note that this only affects ` ListConnection ` and subclasses. If you are
30
+ implementing your own connection resolver, there's an extra keyword named
31
+ ` max_results: int | None ` that will be passed to it.
32
+
33
+ Contributed by [ Thiago Bellini Ribeiro] ( https://github.com/bellini666 ) via [ PR #3746 ] ( https://github.com/strawberry-graphql/strawberry/pull/3746/ )
34
+
35
+
4
36
0.257.0 - 2025-01-09
5
37
--------------------
6
38
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " strawberry-graphql"
3
3
packages = [ { include = " strawberry" } ]
4
- version = " 0.257 .0"
4
+ version = " 0.258 .0"
5
5
description = " A library for creating GraphQL APIs"
6
6
authors = [
" Patrick Arminio <[email protected] >" ]
7
7
license = " MIT"
You can’t perform that action at this time.
0 commit comments