From 3e2f21a178df74881951d4cb5f0758136230c0b1 Mon Sep 17 00:00:00 2001 From: PascalSenn Date: Sat, 8 Jun 2024 12:45:56 +0200 Subject: [PATCH 1/3] Fixed paging helpers --- .../src/EntityFramework/Extensions/PagingResultExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HotChocolate/Data/src/EntityFramework/Extensions/PagingResultExtensions.cs b/src/HotChocolate/Data/src/EntityFramework/Extensions/PagingResultExtensions.cs index bc15e4bee29..c2f77d26115 100644 --- a/src/HotChocolate/Data/src/EntityFramework/Extensions/PagingResultExtensions.cs +++ b/src/HotChocolate/Data/src/EntityFramework/Extensions/PagingResultExtensions.cs @@ -49,8 +49,8 @@ private static Connection CreateConnection(Page page) where T : class return new Connection( page.Items.Select(t => new Edge(t, page.CreateCursor)).ToArray(), new ConnectionPageInfo( - page.HasPreviousPage, page.HasNextPage, + page.HasPreviousPage, CreateCursor(page.First, page.CreateCursor), CreateCursor(page.Last, page.CreateCursor))); } From 199a8a2260159be240ece2ea59a0bac2ef726772 Mon Sep 17 00:00:00 2001 From: PascalSenn Date: Sat, 8 Jun 2024 13:11:37 +0200 Subject: [PATCH 2/3] Fixed snaphsots --- .../IntegrationPagingHelperTests.GetDefaultPage.md | 4 ++-- ...IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md index d11253defc1..35abdc91f38 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md @@ -47,8 +47,8 @@ } ], "pageInfo": { - "hasNextPage": true, - "hasPreviousPage": false, + "hasNextPage": false, + "hasPreviousPage": true, "startCursor": "QnJhbmQwOjE=", "endCursor": "QnJhbmQxNzoxOA==" } diff --git a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md index afed51b780c..e63c112a67c 100644 --- a/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md +++ b/src/HotChocolate/Data/test/Data.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md @@ -15,8 +15,8 @@ } ], "pageInfo": { - "hasNextPage": true, - "hasPreviousPage": false, + "hasNextPage": false, + "hasPreviousPage": true, "startCursor": "QnJhbmQxODoxOQ==", "endCursor": "QnJhbmQxOToyMA==" } From 0056c6ef7ec5e30d8611aaa7b8974e0d279fc46a Mon Sep 17 00:00:00 2001 From: PascalSenn Date: Sat, 8 Jun 2024 13:30:12 +0200 Subject: [PATCH 3/3] Fixed ID tests --- .../QueryableFilterVisitorIdTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HotChocolate/Data/test/Data.Filters.InMemory.Tests/QueryableFilterVisitorIdTests.cs b/src/HotChocolate/Data/test/Data.Filters.InMemory.Tests/QueryableFilterVisitorIdTests.cs index 102e11b59bd..b9044184a5e 100644 --- a/src/HotChocolate/Data/test/Data.Filters.InMemory.Tests/QueryableFilterVisitorIdTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.InMemory.Tests/QueryableFilterVisitorIdTests.cs @@ -458,12 +458,12 @@ public async Task Create_ShortNullableNotEqual_Expression() // act var res1 = await tester.ExecuteAsync( OperationRequestBuilder.Create() - .SetDocument("{ root(where: { barShort: { neq: \"Rm9vOjEy==\"}}){ barShort}}") + .SetDocument("{ root(where: { barShort: { neq: \"Rm9vOjEy\"}}){ barShort}}") .Build()); var res2 = await tester.ExecuteAsync( OperationRequestBuilder.Create() - .SetDocument("{ root(where: { barShort: { neq: \"Rm9vOjEz==\"}}){ barShort}}") + .SetDocument("{ root(where: { barShort: { neq: \"Rm9vOjEz\"}}){ barShort}}") .Build()); var res3 = await tester.ExecuteAsync(