1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Feature-neutral query complexity contract shared by runtime execution and
//! portable client-manifest generation.
/// Default weights for nested query cost (v1 ship defaults).
///
/// | Kind | Weight role |
/// |---|---|
/// | scalar | +`scalar` per leaf field |
/// | belongs_to | `belongs_to` + child selection cost |
/// | has_many / m2m | `has_many`/`m2m` + `list_fanout` × child selection cost |
/// | aggregate | `aggregate` + nodes child cost |
/// | list root | `list_root` + child selection cost (fanout applied to list children) |
/// | by_pk root | `by_pk` + child selection cost |
///
/// `list_fanout` models nested row multiplication without using the full
/// `limit` (which defaults to 100 and would make any nest fail). It is a
/// conservative multiplier so deep `has_many` trees grow faster than flat
/// field counts.
pub
/// Default engine budget (same as the historical builder default).
pub const DEFAULT_MAX_COMPLEXITY: usize = 500;
/// Default maximum GraphQL document depth.
pub const DEFAULT_MAX_DEPTH: usize = 8;
/// Ship-default weight table.
pub