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
14721472
14731473 for selection_field in selection_fields {
14741474 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+ }
14761484 Some ( f) => builder_fields. push ( match & f. type_ . unmodified_type ( ) {
14771485 __Type:: Edge ( _) => ConnectionSelection :: Edge ( to_edge_builder (
14781486 f,
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ select graphql.resolve($$
2121 }
2222}
2323$$);
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 "}]}
2727(1 row)
2828
2929-- Enable aggregates
You can’t perform that action at this time.
0 commit comments