Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ValueCursorPage(
/// <summary>
/// An empty page.
/// </summary>
public static new ValueCursorPage<T> Empty { get; } = new([], false, false, _ => string.Empty);
public static new ValueCursorPage<T> Empty { get; } = new([], false, false, _ => string.Empty, 0);

protected override string CreateCursor(int index, int offset, int pageIndex, int totalCount)
=> _createCursor(new EdgeEntry<T>(Entries[index].Item, offset, pageIndex, totalCount));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,6 @@ public override IReadOnlyList<PageEdge<TNode>>? Edges
/// Identifies the total count of items in the connection.
/// </summary>
[GraphQLDescription("Identifies the total count of items in the connection.")]
public int TotalCount => _page.TotalCount ?? -1;
public int TotalCount =>
_page.TotalCount ?? throw new GraphQLException("Total count is not available for this connection.");
}
Loading