File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1472,7 +1472,15 @@ where
1472
1472
1473
1473
for selection_field in selection_fields {
1474
1474
match field_map. get ( selection_field. name . as_ref ( ) ) {
1475
- None => return Err ( "unknown field in connection" . to_string ( ) ) ,
1475
+ None => {
1476
+ let error = if selection_field. name . as_ref ( ) == "aggregate" {
1477
+ "enable the aggregate directive to use aggregates"
1478
+ } else {
1479
+ "unknown field in connection"
1480
+ }
1481
+ . to_string ( ) ;
1482
+ return Err ( error) ;
1483
+ }
1476
1484
Some ( f) => builder_fields. push ( match & f. type_ . unmodified_type ( ) {
1477
1485
__Type:: Edge ( _) => ConnectionSelection :: Edge ( to_edge_builder (
1478
1486
f,
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ select graphql.resolve($$
21
21
}
22
22
}
23
23
$$);
24
- resolve
25
- ------------------------------------------------------------------------
26
- {"data": null, "errors": [{"message": "unknown field in connection "}]}
24
+ resolve
25
+ ---------------------------------------------------------------------------------------------
26
+ {"data": null, "errors": [{"message": "enable the aggregate directive to use aggregates "}]}
27
27
(1 row)
28
28
29
29
-- Enable aggregates
You can’t perform that action at this time.
0 commit comments