diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs index 98fa8b419b2..5e4ac207edc 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/DataLoaderTests.cs @@ -266,7 +266,7 @@ file static class Extensions { public static Snapshot AddSql(this Snapshot snapshot, List queries) { - snapshot.Add(string.Join("\n", queries), "SQL"); + snapshot.Add(string.Join("\n", queries).Replace("@__p_1_startswith", "@__p_1_rewritten"), "SQL"); return snapshot; } diff --git a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md index 22aa5e794f8..6f50e2049d2 100644 --- a/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md +++ b/src/HotChocolate/Data/test/Data.Filters.SqlServer.Tests/__snapshots__/DataLoaderTests.Filter_With_Filtering.md @@ -4,14 +4,14 @@ ```text .param set @__keys_0 '[1]' -.param set @__p_1_startswith 'Product%' +.param set @__p_1_rewritten 'Product%' SELECT "p"."Id", "p"."AvailableStock", "p"."BrandId", "p"."Description", "p"."ImageFileName", "p"."MaxStockThreshold", "p"."Name", "p"."OnReorder", "p"."Price", "p"."RestockThreshold", "p"."TypeId" FROM "Products" AS "p" WHERE "p"."BrandId" IN ( SELECT "k"."value" FROM json_each(@__keys_0) AS "k" -) AND "p"."Name" LIKE @__p_1_startswith ESCAPE '\' +) AND "p"."Name" LIKE @__p_1_rewritten ESCAPE '\' ``` ## Result diff --git a/src/HotChocolate/Pagination/src/Pagination.Core/Expressions/CursorParser.cs b/src/HotChocolate/Pagination/src/Pagination.Core/Expressions/CursorParser.cs index c98398bbec5..11ad2612de8 100644 --- a/src/HotChocolate/Pagination/src/Pagination.Core/Expressions/CursorParser.cs +++ b/src/HotChocolate/Pagination/src/Pagination.Core/Expressions/CursorParser.cs @@ -9,7 +9,7 @@ namespace HotChocolate.Pagination.Expressions; /// public static class CursorParser { - private const byte _escape = (byte)':'; + private const byte _escape = (byte)'\\'; private const byte _separator = (byte)':'; /// diff --git a/src/HotChocolate/Pagination/src/Pagination.Core/Serialization/CursorKeySerializerHelper.cs b/src/HotChocolate/Pagination/src/Pagination.Core/Serialization/CursorKeySerializerHelper.cs index 9368481b6fb..f684c36a5a3 100644 --- a/src/HotChocolate/Pagination/src/Pagination.Core/Serialization/CursorKeySerializerHelper.cs +++ b/src/HotChocolate/Pagination/src/Pagination.Core/Serialization/CursorKeySerializerHelper.cs @@ -73,7 +73,7 @@ public static class CursorKeySerializerHelper public static bool TryFormat(object? key, ICursorKeySerializer serializer, Span buffer, out int written) { - var success = false; + bool success; if (key is null) { diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/CursorFormatterTests.cs b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/CursorFormatterTests.cs new file mode 100644 index 00000000000..58b22b574a6 --- /dev/null +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/CursorFormatterTests.cs @@ -0,0 +1,121 @@ +using System.Linq.Expressions; +using System.Text; +using System.Text.Unicode; +using HotChocolate.Pagination.Expressions; +using HotChocolate.Pagination.Serialization; + +namespace HotChocolate.Data; + +public class CursorFormatterTests +{ + [Fact] + public void Format_Single_Key() + { + // arrange + var entity = new MyClass { Name = "test" }; + Expression> selector = x => x.Name; + var serializer = new StringCursorKeySerializer(); + + // act + var result = CursorFormatter.Format(entity, [new CursorKey(selector, serializer)]); + + // assert + Assert.Equal("dGVzdA==", result); + Assert.Equal("test", Encoding.UTF8.GetString(Convert.FromBase64String(result))); + } + + [Fact] + public void Format_Single_Key_With_Colon() + { + // arrange + var entity = new MyClass { Name = "test:test" }; + Expression> selector = x => x.Name; + var serializer = new StringCursorKeySerializer(); + + // act + var result = CursorFormatter.Format(entity, [new CursorKey(selector, serializer)]); + + // assert + Assert.Equal("dGVzdFw6dGVzdA==", result); + Assert.Equal("test\\:test", Encoding.UTF8.GetString(Convert.FromBase64String(result))); + } + + [Fact] + public void Format_Two_Keys() + { + // arrange + var entity = new MyClass { Name = "test", Description = "description" }; + Expression> selector1 = x => x.Name; + Expression> selector2 = x => x.Description; + var serializer = new StringCursorKeySerializer(); + + // act + var result = CursorFormatter.Format( + entity, + [ + new CursorKey(selector1, serializer), + new CursorKey(selector2, serializer) + ]); + + // assert + Assert.Equal("dGVzdDpkZXNjcmlwdGlvbg==", result); + Assert.Equal("test:description", Encoding.UTF8.GetString(Convert.FromBase64String(result))); + } + + [Fact] + public void Format_Two_Keys_With_Colon() + { + // arrange + var entity = new MyClass { Name = "test:345", Description = "description:123" }; + Expression> selector1 = x => x.Name; + Expression> selector2 = x => x.Description; + var serializer = new StringCursorKeySerializer(); + + // act + var result = CursorFormatter.Format( + entity, + [ + new CursorKey(selector1, serializer), + new CursorKey(selector2, serializer) + ]); + + // assert + Assert.Equal("dGVzdFw6MzQ1OmRlc2NyaXB0aW9uXDoxMjM=", result); + Assert.Equal("test\\:345:description\\:123", Encoding.UTF8.GetString(Convert.FromBase64String(result))); + } + + [Fact] + public void Format_And_Parse_Two_Keys_With_Colon() + { + // arrange + var entity = new MyClass { Name = "test:345", Description = "description:123" }; + Expression> selector1 = x => x.Name; + Expression> selector2 = x => x.Description; + var serializer = new StringCursorKeySerializer(); + + // act + var formatted = CursorFormatter.Format( + entity, + [ + new CursorKey(selector1, serializer), + new CursorKey(selector2, serializer) + ]); + var parsed =CursorParser.Parse( + formatted, + [ + new CursorKey(selector1, serializer), + new CursorKey(selector2, serializer) + ]); + + // assert + Assert.Equal("test:345", parsed[0]); + Assert.Equal("description:123", parsed[1]); + } + + public class MyClass + { + public string Name { get; set; } = default!; + + public string? Description { get; set; } = default!; + } +} diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/CursorKeySerializerHelperTests.cs b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/CursorKeySerializerHelperTests.cs index 5e2d034c619..d65d6e9cb4d 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/CursorKeySerializerHelperTests.cs +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/CursorKeySerializerHelperTests.cs @@ -139,4 +139,20 @@ public static void TryFormat_BufferTooSmall_ReturnsFalse() Assert.False(success); Assert.Equal(0, written); } + + [Fact] + public static void String_With_Colon_Format_And_Parse() + { + // arrange + object key = "part1:part2"; + Span buffer = new byte[1024]; + + // act + CursorKeySerializerHelper.TryFormat(key, _serializer, buffer, out var written); + var parsedString =CursorKeySerializerHelper.Parse(buffer.Slice(0, written), _serializer); + + + // assert + Assert.Equal(key, parsedString); + } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/PagingHelperIntegrationTests.cs b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/PagingHelperIntegrationTests.cs index 6e14f3e1911..849c0d61917 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/PagingHelperIntegrationTests.cs +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/PagingHelperIntegrationTests.cs @@ -327,7 +327,7 @@ public async Task GetDefaultPage_With_Nullable_Fallback_SecondPage() .SetDocument( """ { - brandsNullableFallback(first: 2, after: "QnJhbmQxMToxMg==") { + brandsNullableFallback(first: 2, after: "QnJhbmRcOjExOjEy") { edges { cursor } @@ -1052,7 +1052,7 @@ private static async Task SeedAsync(string connectionString) { var brand = new Brand { - Name = "Brand" + i, + Name = "Brand:" + i, DisplayName = i % 2 == 0 ? "BrandDisplay" + i : null, BrandDetails = new() { Country = new() { Name = "Country" + i } } }; diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md index c794a8571bb..df519c8494c 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage.md @@ -25,50 +25,50 @@ LIMIT @__p_0 "nodes": [ { "id": 1, - "name": "Brand0" + "name": "Brand:0" }, { "id": 2, - "name": "Brand1" + "name": "Brand:1" }, { "id": 11, - "name": "Brand10" + "name": "Brand:10" }, { "id": 12, - "name": "Brand11" + "name": "Brand:11" }, { "id": 13, - "name": "Brand12" + "name": "Brand:12" }, { "id": 14, - "name": "Brand13" + "name": "Brand:13" }, { "id": 15, - "name": "Brand14" + "name": "Brand:14" }, { "id": 16, - "name": "Brand15" + "name": "Brand:15" }, { "id": 17, - "name": "Brand16" + "name": "Brand:16" }, { "id": 18, - "name": "Brand17" + "name": "Brand:17" } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, - "startCursor": "QnJhbmQwOjE=", - "endCursor": "QnJhbmQxNzoxOA==" + "startCursor": "QnJhbmRcOjA6MQ==", + "endCursor": "QnJhbmRcOjE3OjE4" } } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage2.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage2.md index ac096892d0b..6b5068ae540 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage2.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage2.md @@ -25,50 +25,50 @@ LIMIT @__p_0 "nodes": [ { "id": 1, - "name": "Brand0" + "name": "Brand:0" }, { "id": 2, - "name": "Brand1" + "name": "Brand:1" }, { "id": 11, - "name": "Brand10" + "name": "Brand:10" }, { "id": 12, - "name": "Brand11" + "name": "Brand:11" }, { "id": 13, - "name": "Brand12" + "name": "Brand:12" }, { "id": 14, - "name": "Brand13" + "name": "Brand:13" }, { "id": 15, - "name": "Brand14" + "name": "Brand:14" }, { "id": 16, - "name": "Brand15" + "name": "Brand:15" }, { "id": 17, - "name": "Brand16" + "name": "Brand:16" }, { "id": 18, - "name": "Brand17" + "name": "Brand:17" } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, - "startCursor": "QnJhbmQwOjE=", - "endCursor": "QnJhbmQxNzoxOA==" + "startCursor": "QnJhbmRcOjA6MQ==", + "endCursor": "QnJhbmRcOjE3OjE4" } } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep.md index 94e9856164c..6c6e8b2b639 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep.md @@ -57,7 +57,7 @@ LIMIT @__p_0 "nodes": [ { "id": 1, - "name": "Brand0", + "name": "Brand:0", "displayName": "BrandDisplay0", "brandDetails": { "country": { @@ -67,7 +67,7 @@ LIMIT @__p_0 }, { "id": 2, - "name": "Brand1", + "name": "Brand:1", "displayName": null, "brandDetails": { "country": { @@ -77,7 +77,7 @@ LIMIT @__p_0 }, { "id": 11, - "name": "Brand10", + "name": "Brand:10", "displayName": "BrandDisplay10", "brandDetails": { "country": { @@ -87,7 +87,7 @@ LIMIT @__p_0 }, { "id": 12, - "name": "Brand11", + "name": "Brand:11", "displayName": null, "brandDetails": { "country": { @@ -97,7 +97,7 @@ LIMIT @__p_0 }, { "id": 13, - "name": "Brand12", + "name": "Brand:12", "displayName": "BrandDisplay12", "brandDetails": { "country": { @@ -107,7 +107,7 @@ LIMIT @__p_0 }, { "id": 14, - "name": "Brand13", + "name": "Brand:13", "displayName": null, "brandDetails": { "country": { @@ -117,7 +117,7 @@ LIMIT @__p_0 }, { "id": 15, - "name": "Brand14", + "name": "Brand:14", "displayName": "BrandDisplay14", "brandDetails": { "country": { @@ -127,7 +127,7 @@ LIMIT @__p_0 }, { "id": 16, - "name": "Brand15", + "name": "Brand:15", "displayName": null, "brandDetails": { "country": { @@ -137,7 +137,7 @@ LIMIT @__p_0 }, { "id": 17, - "name": "Brand16", + "name": "Brand:16", "displayName": "BrandDisplay16", "brandDetails": { "country": { @@ -147,7 +147,7 @@ LIMIT @__p_0 }, { "id": 18, - "name": "Brand17", + "name": "Brand:17", "displayName": null, "brandDetails": { "country": { diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep_SecondPage.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep_SecondPage.md index c18777c97d3..bf2af3e49ff 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep_SecondPage.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Deep_SecondPage.md @@ -36,7 +36,7 @@ LIMIT @__p_2 "nodes": [ { "id": 11, - "name": "Brand10", + "name": "Brand:10", "displayName": "BrandDisplay10", "brandDetails": { "country": { @@ -46,7 +46,7 @@ LIMIT @__p_2 }, { "id": 12, - "name": "Brand11", + "name": "Brand:11", "displayName": null, "brandDetails": { "country": { diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable.md index 8894d6b129d..d3b0ef00f1e 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable.md @@ -24,40 +24,40 @@ LIMIT @__p_0 "brandsNullable": { "edges": [ { - "cursor": "QnJhbmQwOlxudWxsOjE=" + "cursor": "QnJhbmRcOjA6XG51bGw6MQ==" }, { - "cursor": "QnJhbmQxOlxudWxsOjI=" + "cursor": "QnJhbmRcOjE6XG51bGw6Mg==" }, { - "cursor": "QnJhbmQxMDpcbnVsbDoxMQ==" + "cursor": "QnJhbmRcOjEwOlxudWxsOjEx" }, { - "cursor": "QnJhbmQxMTpcbnVsbDoxMg==" + "cursor": "QnJhbmRcOjExOlxudWxsOjEy" }, { - "cursor": "QnJhbmQxMjpcbnVsbDoxMw==" + "cursor": "QnJhbmRcOjEyOlxudWxsOjEz" }, { - "cursor": "QnJhbmQxMzpcbnVsbDoxNA==" + "cursor": "QnJhbmRcOjEzOlxudWxsOjE0" }, { - "cursor": "QnJhbmQxNDpcbnVsbDoxNQ==" + "cursor": "QnJhbmRcOjE0OlxudWxsOjE1" }, { - "cursor": "QnJhbmQxNTpcbnVsbDoxNg==" + "cursor": "QnJhbmRcOjE1OlxudWxsOjE2" }, { - "cursor": "QnJhbmQxNjpcbnVsbDoxNw==" + "cursor": "QnJhbmRcOjE2OlxudWxsOjE3" }, { - "cursor": "QnJhbmQxNzpcbnVsbDoxOA==" + "cursor": "QnJhbmRcOjE3OlxudWxsOjE4" } ], "nodes": [ { "id": 1, - "name": "Brand0", + "name": "Brand:0", "displayName": "BrandDisplay0", "brandDetails": { "country": { @@ -67,7 +67,7 @@ LIMIT @__p_0 }, { "id": 2, - "name": "Brand1", + "name": "Brand:1", "displayName": null, "brandDetails": { "country": { @@ -77,7 +77,7 @@ LIMIT @__p_0 }, { "id": 11, - "name": "Brand10", + "name": "Brand:10", "displayName": "BrandDisplay10", "brandDetails": { "country": { @@ -87,7 +87,7 @@ LIMIT @__p_0 }, { "id": 12, - "name": "Brand11", + "name": "Brand:11", "displayName": null, "brandDetails": { "country": { @@ -97,7 +97,7 @@ LIMIT @__p_0 }, { "id": 13, - "name": "Brand12", + "name": "Brand:12", "displayName": "BrandDisplay12", "brandDetails": { "country": { @@ -107,7 +107,7 @@ LIMIT @__p_0 }, { "id": 14, - "name": "Brand13", + "name": "Brand:13", "displayName": null, "brandDetails": { "country": { @@ -117,7 +117,7 @@ LIMIT @__p_0 }, { "id": 15, - "name": "Brand14", + "name": "Brand:14", "displayName": "BrandDisplay14", "brandDetails": { "country": { @@ -127,7 +127,7 @@ LIMIT @__p_0 }, { "id": 16, - "name": "Brand15", + "name": "Brand:15", "displayName": null, "brandDetails": { "country": { @@ -137,7 +137,7 @@ LIMIT @__p_0 }, { "id": 17, - "name": "Brand16", + "name": "Brand:16", "displayName": "BrandDisplay16", "brandDetails": { "country": { @@ -147,7 +147,7 @@ LIMIT @__p_0 }, { "id": 18, - "name": "Brand17", + "name": "Brand:17", "displayName": null, "brandDetails": { "country": { @@ -159,8 +159,8 @@ LIMIT @__p_0 "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, - "startCursor": "QnJhbmQwOlxudWxsOjE=", - "endCursor": "QnJhbmQxNzpcbnVsbDoxOA==" + "startCursor": "QnJhbmRcOjA6XG51bGw6MQ==", + "endCursor": "QnJhbmRcOjE3OlxudWxsOjE4" } } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback.md index 84621cf9bb9..0f33dd8a386 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback.md @@ -24,40 +24,40 @@ LIMIT @__p_0 "brandsNullableFallback": { "edges": [ { - "cursor": "QnJhbmQxOjI=" + "cursor": "QnJhbmRcOjE6Mg==" }, { - "cursor": "QnJhbmQxMToxMg==" + "cursor": "QnJhbmRcOjExOjEy" }, { - "cursor": "QnJhbmQxMzoxNA==" + "cursor": "QnJhbmRcOjEzOjE0" }, { - "cursor": "QnJhbmQxNToxNg==" + "cursor": "QnJhbmRcOjE1OjE2" }, { - "cursor": "QnJhbmQxNzoxOA==" + "cursor": "QnJhbmRcOjE3OjE4" }, { - "cursor": "QnJhbmQxOToyMA==" + "cursor": "QnJhbmRcOjE5OjIw" }, { - "cursor": "QnJhbmQyMToyMg==" + "cursor": "QnJhbmRcOjIxOjIy" }, { - "cursor": "QnJhbmQyMzoyNA==" + "cursor": "QnJhbmRcOjIzOjI0" }, { - "cursor": "QnJhbmQyNToyNg==" + "cursor": "QnJhbmRcOjI1OjI2" }, { - "cursor": "QnJhbmQyNzoyOA==" + "cursor": "QnJhbmRcOjI3OjI4" } ], "nodes": [ { "id": 2, - "name": "Brand1", + "name": "Brand:1", "displayName": null, "brandDetails": { "country": { @@ -67,7 +67,7 @@ LIMIT @__p_0 }, { "id": 12, - "name": "Brand11", + "name": "Brand:11", "displayName": null, "brandDetails": { "country": { @@ -77,7 +77,7 @@ LIMIT @__p_0 }, { "id": 14, - "name": "Brand13", + "name": "Brand:13", "displayName": null, "brandDetails": { "country": { @@ -87,7 +87,7 @@ LIMIT @__p_0 }, { "id": 16, - "name": "Brand15", + "name": "Brand:15", "displayName": null, "brandDetails": { "country": { @@ -97,7 +97,7 @@ LIMIT @__p_0 }, { "id": 18, - "name": "Brand17", + "name": "Brand:17", "displayName": null, "brandDetails": { "country": { @@ -107,7 +107,7 @@ LIMIT @__p_0 }, { "id": 20, - "name": "Brand19", + "name": "Brand:19", "displayName": null, "brandDetails": { "country": { @@ -117,7 +117,7 @@ LIMIT @__p_0 }, { "id": 22, - "name": "Brand21", + "name": "Brand:21", "displayName": null, "brandDetails": { "country": { @@ -127,7 +127,7 @@ LIMIT @__p_0 }, { "id": 24, - "name": "Brand23", + "name": "Brand:23", "displayName": null, "brandDetails": { "country": { @@ -137,7 +137,7 @@ LIMIT @__p_0 }, { "id": 26, - "name": "Brand25", + "name": "Brand:25", "displayName": null, "brandDetails": { "country": { @@ -147,7 +147,7 @@ LIMIT @__p_0 }, { "id": 28, - "name": "Brand27", + "name": "Brand:27", "displayName": null, "brandDetails": { "country": { @@ -159,8 +159,8 @@ LIMIT @__p_0 "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, - "startCursor": "QnJhbmQxOjI=", - "endCursor": "QnJhbmQyNzoyOA==" + "startCursor": "QnJhbmRcOjE6Mg==", + "endCursor": "QnJhbmRcOjI3OjI4" } } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md index 6b40ccce2c4..7d1e5521903 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_Fallback_SecondPage.md @@ -3,7 +3,7 @@ ## SQL 0 ```sql --- @__p_0='Brand11' +-- @__p_0='Brand:11' -- @__p_1='12' -- @__p_2='3' SELECT b."Id", b."AlwaysNull", b."DisplayName", b."Name", b."BrandDetails_Country_Name" @@ -27,16 +27,16 @@ LIMIT @__p_2 "brandsNullableFallback": { "edges": [ { - "cursor": "QnJhbmQxMzoxNA==" + "cursor": "QnJhbmRcOjEzOjE0" }, { - "cursor": "QnJhbmQxNToxNg==" + "cursor": "QnJhbmRcOjE1OjE2" } ], "nodes": [ { "id": 14, - "name": "Brand13", + "name": "Brand:13", "displayName": null, "brandDetails": { "country": { @@ -46,7 +46,7 @@ LIMIT @__p_2 }, { "id": 16, - "name": "Brand15", + "name": "Brand:15", "displayName": null, "brandDetails": { "country": { @@ -58,8 +58,8 @@ LIMIT @__p_2 "pageInfo": { "hasNextPage": true, "hasPreviousPage": true, - "startCursor": "QnJhbmQxMzoxNA==", - "endCursor": "QnJhbmQxNToxNg==" + "startCursor": "QnJhbmRcOjEzOjE0", + "endCursor": "QnJhbmRcOjE1OjE2" } } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_SecondPage.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_SecondPage.md index 5da7d78b12a..b84ea779d05 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_SecondPage.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetDefaultPage_With_Nullable_SecondPage.md @@ -27,16 +27,16 @@ LIMIT @__p_3 "brandsNullable": { "edges": [ { - "cursor": "QnJhbmQxMTpcbnVsbDoxMg==" + "cursor": "QnJhbmRcOjExOlxudWxsOjEy" }, { - "cursor": "QnJhbmQxMjpcbnVsbDoxMw==" + "cursor": "QnJhbmRcOjEyOlxudWxsOjEz" } ], "nodes": [ { "id": 12, - "name": "Brand11", + "name": "Brand:11", "displayName": null, "brandDetails": { "country": { @@ -46,7 +46,7 @@ LIMIT @__p_3 }, { "id": 13, - "name": "Brand12", + "name": "Brand:12", "displayName": "BrandDisplay12", "brandDetails": { "country": { @@ -58,8 +58,8 @@ LIMIT @__p_3 "pageInfo": { "hasNextPage": true, "hasPreviousPage": true, - "startCursor": "QnJhbmQxMTpcbnVsbDoxMg==", - "endCursor": "QnJhbmQxMjpcbnVsbDoxMw==" + "startCursor": "QnJhbmRcOjExOlxudWxsOjEy", + "endCursor": "QnJhbmRcOjEyOlxudWxsOjEz" } } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md index 94747f17c6a..61ce4e8f49c 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.GetSecondPage_With_2_Items.md @@ -28,18 +28,18 @@ LIMIT @__p_2 "nodes": [ { "id": 19, - "name": "Brand18" + "name": "Brand:18" }, { "id": 20, - "name": "Brand19" + "name": "Brand:19" } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": true, - "startCursor": "QnJhbmQxODoxOQ==", - "endCursor": "QnJhbmQxOToyMA==" + "startCursor": "QnJhbmRcOjE4OjE5", + "endCursor": "QnJhbmRcOjE5OjIw" } } } diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto.md index 808bca98e86..b90182e645e 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto.md @@ -24,19 +24,19 @@ LIMIT @__p_0 "brands": { "edges": [ { - "cursor": "QnJhbmQwOjE=", + "cursor": "QnJhbmRcOjA6MQ==", "displayName": "BrandDisplay0", "node": { "id": 1, - "name": "Brand0" + "name": "Brand:0" } }, { - "cursor": "QnJhbmQxOjI=", + "cursor": "QnJhbmRcOjE6Mg==", "displayName": null, "node": { "id": 2, - "name": "Brand1" + "name": "Brand:1" } } ] diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto_2.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto_2.md index 0c6e949bacf..065ef3c6f9d 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto_2.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Map_Page_To_Connection_With_Dto_2.md @@ -24,19 +24,19 @@ LIMIT @__p_0 "brands": { "edges": [ { - "cursor": "QnJhbmQwOjE=", + "cursor": "QnJhbmRcOjA6MQ==", "displayName": "BrandDisplay0", "node": { "id": 1, - "name": "Brand0" + "name": "Brand:0" } }, { - "cursor": "QnJhbmQxOjI=", + "cursor": "QnJhbmRcOjE6Mg==", "displayName": null, "node": { "id": 2, - "name": "Brand1" + "name": "Brand:1" } } ] diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2.md index 79ffbfeb8f4..30e4889b6bb 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2.md @@ -53,10 +53,10 @@ ORDER BY t."BrandId", t0."BrandId", t0."Name", t0."Id" "brands": { "edges": [ { - "cursor": "QnJhbmQwOjE=" + "cursor": "QnJhbmRcOjA6MQ==" }, { - "cursor": "QnJhbmQxOjI=" + "cursor": "QnJhbmRcOjE6Mg==" } ], "nodes": [ diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_NET9_0.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_NET9_0.md index 5125369ac0e..8ade6d72a9e 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_NET9_0.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_NET9_0.md @@ -53,10 +53,10 @@ ORDER BY p1."BrandId", p3."BrandId", p3."Name", p3."Id" "brands": { "edges": [ { - "cursor": "QnJhbmQwOjE=" + "cursor": "QnJhbmRcOjA6MQ==" }, { - "cursor": "QnJhbmQxOjI=" + "cursor": "QnJhbmRcOjE6Mg==" } ], "nodes": [ diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections.md index 04fc9c6aee0..edbb51224b8 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections.md @@ -53,10 +53,10 @@ ORDER BY t."BrandId", t0."BrandId", t0."Name", t0."Id" "brands": { "edges": [ { - "cursor": "QnJhbmQwOjE=" + "cursor": "QnJhbmRcOjA6MQ==" }, { - "cursor": "QnJhbmQxOjI=" + "cursor": "QnJhbmRcOjE6Mg==" } ], "nodes": [ diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections_NET9_0.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections_NET9_0.md index 3b5162ff3a7..71f5f62f4ce 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections_NET9_0.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Nested_Paging_First_2_With_Projections_NET9_0.md @@ -53,10 +53,10 @@ ORDER BY p1."BrandId", p3."BrandId", p3."Name", p3."Id" "brands": { "edges": [ { - "cursor": "QnJhbmQwOjE=" + "cursor": "QnJhbmRcOjA6MQ==" }, { - "cursor": "QnJhbmQxOjI=" + "cursor": "QnJhbmRcOjE6Mg==" } ], "nodes": [ diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Empty_PagingArgs.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Empty_PagingArgs.md index 84ceccc8cab..e6e8cfb64fe 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Empty_PagingArgs.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Empty_PagingArgs.md @@ -21,9 +21,9 @@ ORDER BY b."Name", b."Id" "HasNextPage": false, "HasPreviousPage": false, "First": 1, - "FirstCursor": "QnJhbmQwOjE=", + "FirstCursor": "QnJhbmRcOjA6MQ==", "Last": 100, - "LastCursor": "QnJhbmQ5OToxMDA=" + "LastCursor": "QnJhbmRcOjk5OjEwMA==" } ``` @@ -33,7 +33,7 @@ ORDER BY b."Name", b."Id" [ { "Id": 1, - "Name": "Brand0", + "Name": "Brand:0", "DisplayName": "BrandDisplay0", "AlwaysNull": null, "Products": [], @@ -45,7 +45,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 2, - "Name": "Brand1", + "Name": "Brand:1", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -57,7 +57,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 11, - "Name": "Brand10", + "Name": "Brand:10", "DisplayName": "BrandDisplay10", "AlwaysNull": null, "Products": [], @@ -69,7 +69,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 12, - "Name": "Brand11", + "Name": "Brand:11", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -81,7 +81,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 13, - "Name": "Brand12", + "Name": "Brand:12", "DisplayName": "BrandDisplay12", "AlwaysNull": null, "Products": [], @@ -93,7 +93,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 14, - "Name": "Brand13", + "Name": "Brand:13", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -105,7 +105,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 15, - "Name": "Brand14", + "Name": "Brand:14", "DisplayName": "BrandDisplay14", "AlwaysNull": null, "Products": [], @@ -117,7 +117,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 16, - "Name": "Brand15", + "Name": "Brand:15", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -129,7 +129,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 17, - "Name": "Brand16", + "Name": "Brand:16", "DisplayName": "BrandDisplay16", "AlwaysNull": null, "Products": [], @@ -141,7 +141,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 18, - "Name": "Brand17", + "Name": "Brand:17", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -153,7 +153,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 19, - "Name": "Brand18", + "Name": "Brand:18", "DisplayName": "BrandDisplay18", "AlwaysNull": null, "Products": [], @@ -165,7 +165,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 20, - "Name": "Brand19", + "Name": "Brand:19", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -177,7 +177,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 3, - "Name": "Brand2", + "Name": "Brand:2", "DisplayName": "BrandDisplay2", "AlwaysNull": null, "Products": [], @@ -189,7 +189,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 21, - "Name": "Brand20", + "Name": "Brand:20", "DisplayName": "BrandDisplay20", "AlwaysNull": null, "Products": [], @@ -201,7 +201,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 22, - "Name": "Brand21", + "Name": "Brand:21", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -213,7 +213,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 23, - "Name": "Brand22", + "Name": "Brand:22", "DisplayName": "BrandDisplay22", "AlwaysNull": null, "Products": [], @@ -225,7 +225,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 24, - "Name": "Brand23", + "Name": "Brand:23", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -237,7 +237,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 25, - "Name": "Brand24", + "Name": "Brand:24", "DisplayName": "BrandDisplay24", "AlwaysNull": null, "Products": [], @@ -249,7 +249,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 26, - "Name": "Brand25", + "Name": "Brand:25", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -261,7 +261,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 27, - "Name": "Brand26", + "Name": "Brand:26", "DisplayName": "BrandDisplay26", "AlwaysNull": null, "Products": [], @@ -273,7 +273,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 28, - "Name": "Brand27", + "Name": "Brand:27", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -285,7 +285,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 29, - "Name": "Brand28", + "Name": "Brand:28", "DisplayName": "BrandDisplay28", "AlwaysNull": null, "Products": [], @@ -297,7 +297,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 30, - "Name": "Brand29", + "Name": "Brand:29", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -309,7 +309,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 4, - "Name": "Brand3", + "Name": "Brand:3", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -321,7 +321,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 31, - "Name": "Brand30", + "Name": "Brand:30", "DisplayName": "BrandDisplay30", "AlwaysNull": null, "Products": [], @@ -333,7 +333,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 32, - "Name": "Brand31", + "Name": "Brand:31", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -345,7 +345,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 33, - "Name": "Brand32", + "Name": "Brand:32", "DisplayName": "BrandDisplay32", "AlwaysNull": null, "Products": [], @@ -357,7 +357,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 34, - "Name": "Brand33", + "Name": "Brand:33", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -369,7 +369,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 35, - "Name": "Brand34", + "Name": "Brand:34", "DisplayName": "BrandDisplay34", "AlwaysNull": null, "Products": [], @@ -381,7 +381,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 36, - "Name": "Brand35", + "Name": "Brand:35", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -393,7 +393,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 37, - "Name": "Brand36", + "Name": "Brand:36", "DisplayName": "BrandDisplay36", "AlwaysNull": null, "Products": [], @@ -405,7 +405,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 38, - "Name": "Brand37", + "Name": "Brand:37", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -417,7 +417,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 39, - "Name": "Brand38", + "Name": "Brand:38", "DisplayName": "BrandDisplay38", "AlwaysNull": null, "Products": [], @@ -429,7 +429,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 40, - "Name": "Brand39", + "Name": "Brand:39", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -441,7 +441,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 5, - "Name": "Brand4", + "Name": "Brand:4", "DisplayName": "BrandDisplay4", "AlwaysNull": null, "Products": [], @@ -453,7 +453,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 41, - "Name": "Brand40", + "Name": "Brand:40", "DisplayName": "BrandDisplay40", "AlwaysNull": null, "Products": [], @@ -465,7 +465,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 42, - "Name": "Brand41", + "Name": "Brand:41", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -477,7 +477,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 43, - "Name": "Brand42", + "Name": "Brand:42", "DisplayName": "BrandDisplay42", "AlwaysNull": null, "Products": [], @@ -489,7 +489,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 44, - "Name": "Brand43", + "Name": "Brand:43", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -501,7 +501,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 45, - "Name": "Brand44", + "Name": "Brand:44", "DisplayName": "BrandDisplay44", "AlwaysNull": null, "Products": [], @@ -513,7 +513,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 46, - "Name": "Brand45", + "Name": "Brand:45", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -525,7 +525,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 47, - "Name": "Brand46", + "Name": "Brand:46", "DisplayName": "BrandDisplay46", "AlwaysNull": null, "Products": [], @@ -537,7 +537,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 48, - "Name": "Brand47", + "Name": "Brand:47", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -549,7 +549,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 49, - "Name": "Brand48", + "Name": "Brand:48", "DisplayName": "BrandDisplay48", "AlwaysNull": null, "Products": [], @@ -561,7 +561,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 50, - "Name": "Brand49", + "Name": "Brand:49", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -573,7 +573,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 6, - "Name": "Brand5", + "Name": "Brand:5", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -585,7 +585,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 51, - "Name": "Brand50", + "Name": "Brand:50", "DisplayName": "BrandDisplay50", "AlwaysNull": null, "Products": [], @@ -597,7 +597,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 52, - "Name": "Brand51", + "Name": "Brand:51", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -609,7 +609,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 53, - "Name": "Brand52", + "Name": "Brand:52", "DisplayName": "BrandDisplay52", "AlwaysNull": null, "Products": [], @@ -621,7 +621,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 54, - "Name": "Brand53", + "Name": "Brand:53", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -633,7 +633,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 55, - "Name": "Brand54", + "Name": "Brand:54", "DisplayName": "BrandDisplay54", "AlwaysNull": null, "Products": [], @@ -645,7 +645,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 56, - "Name": "Brand55", + "Name": "Brand:55", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -657,7 +657,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 57, - "Name": "Brand56", + "Name": "Brand:56", "DisplayName": "BrandDisplay56", "AlwaysNull": null, "Products": [], @@ -669,7 +669,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 58, - "Name": "Brand57", + "Name": "Brand:57", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -681,7 +681,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 59, - "Name": "Brand58", + "Name": "Brand:58", "DisplayName": "BrandDisplay58", "AlwaysNull": null, "Products": [], @@ -693,7 +693,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 60, - "Name": "Brand59", + "Name": "Brand:59", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -705,7 +705,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 7, - "Name": "Brand6", + "Name": "Brand:6", "DisplayName": "BrandDisplay6", "AlwaysNull": null, "Products": [], @@ -717,7 +717,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 61, - "Name": "Brand60", + "Name": "Brand:60", "DisplayName": "BrandDisplay60", "AlwaysNull": null, "Products": [], @@ -729,7 +729,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 62, - "Name": "Brand61", + "Name": "Brand:61", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -741,7 +741,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 63, - "Name": "Brand62", + "Name": "Brand:62", "DisplayName": "BrandDisplay62", "AlwaysNull": null, "Products": [], @@ -753,7 +753,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 64, - "Name": "Brand63", + "Name": "Brand:63", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -765,7 +765,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 65, - "Name": "Brand64", + "Name": "Brand:64", "DisplayName": "BrandDisplay64", "AlwaysNull": null, "Products": [], @@ -777,7 +777,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 66, - "Name": "Brand65", + "Name": "Brand:65", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -789,7 +789,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 67, - "Name": "Brand66", + "Name": "Brand:66", "DisplayName": "BrandDisplay66", "AlwaysNull": null, "Products": [], @@ -801,7 +801,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 68, - "Name": "Brand67", + "Name": "Brand:67", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -813,7 +813,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 69, - "Name": "Brand68", + "Name": "Brand:68", "DisplayName": "BrandDisplay68", "AlwaysNull": null, "Products": [], @@ -825,7 +825,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 70, - "Name": "Brand69", + "Name": "Brand:69", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -837,7 +837,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 8, - "Name": "Brand7", + "Name": "Brand:7", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -849,7 +849,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 71, - "Name": "Brand70", + "Name": "Brand:70", "DisplayName": "BrandDisplay70", "AlwaysNull": null, "Products": [], @@ -861,7 +861,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 72, - "Name": "Brand71", + "Name": "Brand:71", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -873,7 +873,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 73, - "Name": "Brand72", + "Name": "Brand:72", "DisplayName": "BrandDisplay72", "AlwaysNull": null, "Products": [], @@ -885,7 +885,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 74, - "Name": "Brand73", + "Name": "Brand:73", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -897,7 +897,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 75, - "Name": "Brand74", + "Name": "Brand:74", "DisplayName": "BrandDisplay74", "AlwaysNull": null, "Products": [], @@ -909,7 +909,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 76, - "Name": "Brand75", + "Name": "Brand:75", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -921,7 +921,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 77, - "Name": "Brand76", + "Name": "Brand:76", "DisplayName": "BrandDisplay76", "AlwaysNull": null, "Products": [], @@ -933,7 +933,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 78, - "Name": "Brand77", + "Name": "Brand:77", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -945,7 +945,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 79, - "Name": "Brand78", + "Name": "Brand:78", "DisplayName": "BrandDisplay78", "AlwaysNull": null, "Products": [], @@ -957,7 +957,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 80, - "Name": "Brand79", + "Name": "Brand:79", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -969,7 +969,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 9, - "Name": "Brand8", + "Name": "Brand:8", "DisplayName": "BrandDisplay8", "AlwaysNull": null, "Products": [], @@ -981,7 +981,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 81, - "Name": "Brand80", + "Name": "Brand:80", "DisplayName": "BrandDisplay80", "AlwaysNull": null, "Products": [], @@ -993,7 +993,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 82, - "Name": "Brand81", + "Name": "Brand:81", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1005,7 +1005,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 83, - "Name": "Brand82", + "Name": "Brand:82", "DisplayName": "BrandDisplay82", "AlwaysNull": null, "Products": [], @@ -1017,7 +1017,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 84, - "Name": "Brand83", + "Name": "Brand:83", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1029,7 +1029,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 85, - "Name": "Brand84", + "Name": "Brand:84", "DisplayName": "BrandDisplay84", "AlwaysNull": null, "Products": [], @@ -1041,7 +1041,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 86, - "Name": "Brand85", + "Name": "Brand:85", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1053,7 +1053,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 87, - "Name": "Brand86", + "Name": "Brand:86", "DisplayName": "BrandDisplay86", "AlwaysNull": null, "Products": [], @@ -1065,7 +1065,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 88, - "Name": "Brand87", + "Name": "Brand:87", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1077,7 +1077,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 89, - "Name": "Brand88", + "Name": "Brand:88", "DisplayName": "BrandDisplay88", "AlwaysNull": null, "Products": [], @@ -1089,7 +1089,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 90, - "Name": "Brand89", + "Name": "Brand:89", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1101,7 +1101,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 10, - "Name": "Brand9", + "Name": "Brand:9", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1113,7 +1113,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 91, - "Name": "Brand90", + "Name": "Brand:90", "DisplayName": "BrandDisplay90", "AlwaysNull": null, "Products": [], @@ -1125,7 +1125,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 92, - "Name": "Brand91", + "Name": "Brand:91", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1137,7 +1137,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 93, - "Name": "Brand92", + "Name": "Brand:92", "DisplayName": "BrandDisplay92", "AlwaysNull": null, "Products": [], @@ -1149,7 +1149,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 94, - "Name": "Brand93", + "Name": "Brand:93", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1161,7 +1161,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 95, - "Name": "Brand94", + "Name": "Brand:94", "DisplayName": "BrandDisplay94", "AlwaysNull": null, "Products": [], @@ -1173,7 +1173,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 96, - "Name": "Brand95", + "Name": "Brand:95", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1185,7 +1185,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 97, - "Name": "Brand96", + "Name": "Brand:96", "DisplayName": "BrandDisplay96", "AlwaysNull": null, "Products": [], @@ -1197,7 +1197,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 98, - "Name": "Brand97", + "Name": "Brand:97", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -1209,7 +1209,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 99, - "Name": "Brand98", + "Name": "Brand:98", "DisplayName": "BrandDisplay98", "AlwaysNull": null, "Products": [], @@ -1221,7 +1221,7 @@ ORDER BY b."Name", b."Id" }, { "Id": 100, - "Name": "Brand99", + "Name": "Brand:99", "DisplayName": null, "AlwaysNull": null, "Products": [], diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5.md index 3d47e9e96a0..84fbabb9dca 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5.md @@ -23,9 +23,9 @@ LIMIT @__p_0 "HasNextPage": true, "HasPreviousPage": false, "First": 1, - "FirstCursor": "QnJhbmQwOjE=", + "FirstCursor": "QnJhbmRcOjA6MQ==", "Last": 13, - "LastCursor": "QnJhbmQxMjoxMw==" + "LastCursor": "QnJhbmRcOjEyOjEz" } ``` @@ -35,7 +35,7 @@ LIMIT @__p_0 [ { "Id": 1, - "Name": "Brand0", + "Name": "Brand:0", "DisplayName": "BrandDisplay0", "AlwaysNull": null, "Products": [], @@ -47,7 +47,7 @@ LIMIT @__p_0 }, { "Id": 2, - "Name": "Brand1", + "Name": "Brand:1", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -59,7 +59,7 @@ LIMIT @__p_0 }, { "Id": 11, - "Name": "Brand10", + "Name": "Brand:10", "DisplayName": "BrandDisplay10", "AlwaysNull": null, "Products": [], @@ -71,7 +71,7 @@ LIMIT @__p_0 }, { "Id": 12, - "Name": "Brand11", + "Name": "Brand:11", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -83,7 +83,7 @@ LIMIT @__p_0 }, { "Id": 13, - "Name": "Brand12", + "Name": "Brand:12", "DisplayName": "BrandDisplay12", "AlwaysNull": null, "Products": [], diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_After_Id_13.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_After_Id_13.md index fbe637b2d28..1c22abc47e7 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_After_Id_13.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_After_Id_13.md @@ -26,9 +26,9 @@ LIMIT @__p_2 "HasNextPage": true, "HasPreviousPage": true, "First": 14, - "FirstCursor": "QnJhbmQxMzoxNA==", + "FirstCursor": "QnJhbmRcOjEzOjE0", "Last": 18, - "LastCursor": "QnJhbmQxNzoxOA==" + "LastCursor": "QnJhbmRcOjE3OjE4" } ``` @@ -38,7 +38,7 @@ LIMIT @__p_2 [ { "Id": 14, - "Name": "Brand13", + "Name": "Brand:13", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -50,7 +50,7 @@ LIMIT @__p_2 }, { "Id": 15, - "Name": "Brand14", + "Name": "Brand:14", "DisplayName": "BrandDisplay14", "AlwaysNull": null, "Products": [], @@ -62,7 +62,7 @@ LIMIT @__p_2 }, { "Id": 16, - "Name": "Brand15", + "Name": "Brand:15", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -74,7 +74,7 @@ LIMIT @__p_2 }, { "Id": 17, - "Name": "Brand16", + "Name": "Brand:16", "DisplayName": "BrandDisplay16", "AlwaysNull": null, "Products": [], @@ -86,7 +86,7 @@ LIMIT @__p_2 }, { "Id": 18, - "Name": "Brand17", + "Name": "Brand:17", "DisplayName": null, "AlwaysNull": null, "Products": [], diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_Before_Id_96.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_Before_Id_96.md index b30b11b2e0e..1a231611962 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_Before_Id_96.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_First_5_Before_Id_96.md @@ -25,10 +25,10 @@ LIMIT @__p_2 { "HasNextPage": true, "HasPreviousPage": true, - "First": 91, - "FirstCursor": "QnJhbmQ5MDo5MQ==", - "Last": 95, - "LastCursor": "QnJhbmQ5NDo5NQ==" + "First": 92, + "FirstCursor": "QnJhbmRcOjkxOjky", + "Last": 96, + "LastCursor": "QnJhbmRcOjk1Ojk2" } ``` @@ -36,21 +36,9 @@ LIMIT @__p_2 ```json [ - { - "Id": 91, - "Name": "Brand90", - "DisplayName": "BrandDisplay90", - "AlwaysNull": null, - "Products": [], - "BrandDetails": { - "Country": { - "Name": "Country90" - } - } - }, { "Id": 92, - "Name": "Brand91", + "Name": "Brand:91", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -62,7 +50,7 @@ LIMIT @__p_2 }, { "Id": 93, - "Name": "Brand92", + "Name": "Brand:92", "DisplayName": "BrandDisplay92", "AlwaysNull": null, "Products": [], @@ -74,7 +62,7 @@ LIMIT @__p_2 }, { "Id": 94, - "Name": "Brand93", + "Name": "Brand:93", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -86,7 +74,7 @@ LIMIT @__p_2 }, { "Id": 95, - "Name": "Brand94", + "Name": "Brand:94", "DisplayName": "BrandDisplay94", "AlwaysNull": null, "Products": [], @@ -95,6 +83,18 @@ LIMIT @__p_2 "Name": "Country94" } } + }, + { + "Id": 96, + "Name": "Brand:95", + "DisplayName": null, + "AlwaysNull": null, + "Products": [], + "BrandDetails": { + "Country": { + "Name": "Country95" + } + } } ] ``` diff --git a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Last_5.md b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Last_5.md index 1e0341186cf..8b04e57e616 100644 --- a/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Last_5.md +++ b/src/HotChocolate/Pagination/test/Pagination.EntityFramework.Tests/__snapshots__/IntegrationPagingHelperTests.Paging_Last_5.md @@ -23,9 +23,9 @@ LIMIT @__p_0 "HasNextPage": false, "HasPreviousPage": true, "First": 96, - "FirstCursor": "QnJhbmQ5NTo5Ng==", + "FirstCursor": "QnJhbmRcOjk1Ojk2", "Last": 100, - "LastCursor": "QnJhbmQ5OToxMDA=" + "LastCursor": "QnJhbmRcOjk5OjEwMA==" } ``` @@ -35,7 +35,7 @@ LIMIT @__p_0 [ { "Id": 96, - "Name": "Brand95", + "Name": "Brand:95", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -47,7 +47,7 @@ LIMIT @__p_0 }, { "Id": 97, - "Name": "Brand96", + "Name": "Brand:96", "DisplayName": "BrandDisplay96", "AlwaysNull": null, "Products": [], @@ -59,7 +59,7 @@ LIMIT @__p_0 }, { "Id": 98, - "Name": "Brand97", + "Name": "Brand:97", "DisplayName": null, "AlwaysNull": null, "Products": [], @@ -71,7 +71,7 @@ LIMIT @__p_0 }, { "Id": 99, - "Name": "Brand98", + "Name": "Brand:98", "DisplayName": "BrandDisplay98", "AlwaysNull": null, "Products": [], @@ -83,7 +83,7 @@ LIMIT @__p_0 }, { "Id": 100, - "Name": "Brand99", + "Name": "Brand:99", "DisplayName": null, "AlwaysNull": null, "Products": [],