diff --git a/explorer/src/api/graphql/mod.rs b/explorer/src/api/graphql/mod.rs index d666c8120a..930ecd9ec8 100644 --- a/explorer/src/api/graphql/mod.rs +++ b/explorer/src/api/graphql/mod.rs @@ -549,7 +549,9 @@ impl Block { last: Option, before: Option, after: Option, - ) -> FieldResult> { + ) -> FieldResult< + Connection, EmptyFields>, + > { let explorer_block = self .fetch_explorer_block(&extract_context(&context).db) .await?; @@ -591,8 +593,13 @@ impl Block { }; let (range, page_meta) = compute_interval(boundaries, pagination_arguments)?; - let mut connection = - Connection::new(page_meta.has_previous_page, page_meta.has_next_page); + let mut connection = Connection::with_additional_fields( + page_meta.has_previous_page, + page_meta.has_next_page, + ConnectionFields { + total_count: page_meta.total_count, + }, + ); let edges = match range { PaginationInterval::Empty => vec![],