Skip to content

Commit 143eb2f

Browse files
authored
Merge branch 'main' into 8775
2 parents d3833a9 + a1be2c0 commit 143eb2f

File tree

856 files changed

+44538
-14670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

856 files changed

+44538
-14670
lines changed

.editorconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ csharp_space_between_parentheses = false
9999
csharp_preserve_single_line_statements = false
100100
csharp_preserve_single_line_blocks = true
101101

102-
dotnet_style_require_accessibility_modifiers = always
103-
104102
# Public API
105103
dotnet_diagnostic.rs0016.severity = warning
106104
dotnet_diagnostic.rcs1194.severity = none
@@ -203,6 +201,9 @@ dotnet_diagnostic.IDE0028.severity = warning
203201
dotnet_diagnostic.IDE0036.severity = warning
204202
# Use inferred member names.
205203
dotnet_diagnostic.IDE0037.severity = warning
204+
# Add accessibility modifiers.
205+
dotnet_diagnostic.IDE0040.severity = warning
206+
dotnet_style_require_accessibility_modifiers = for_non_interface_members
206207
# Add readonly modifier.
207208
dotnet_diagnostic.IDE0044.severity = warning
208209
dotnet_diagnostic.RCS1169.severity = none

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
- name: Install .NET
149149
uses: actions/setup-dotnet@v4
150150
with:
151-
dotnet-version: 10.x
151+
dotnet-version: 10.0.100-rc.1.25451.107
152152

153153
- name: Generate Test Matrix
154154
run: dotnet run --project ./.build -- GenerateMatrix
@@ -181,7 +181,7 @@ jobs:
181181
dotnet-version: |
182182
8.x
183183
9.x
184-
10.x
184+
10.0.100-rc.1.25451.107
185185
186186
- name: Run Build
187187
id: run-build
@@ -252,7 +252,7 @@ jobs:
252252
with:
253253
token: ${{ secrets.CODECOV_TOKEN }}
254254
name: graphql-platform
255-
files: './output/download/coverage-*/*/coverage.opencover.xml'
255+
files: "./output/download/coverage-*/*/coverage.opencover.xml"
256256
disable_search: true
257257
flags: unittests
258258
fail_ci_if_error: true

.github/workflows/coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
- main-version-*
88
paths:
9-
- 'src/**'
9+
- "src/**"
1010

1111
concurrency:
1212
group: main-coverage
@@ -32,7 +32,7 @@ jobs:
3232
dotnet-version: |
3333
8.x
3434
9.x
35-
10.x
35+
10.0.100-rc.1.25451.107
3636
3737
- name: Generate Test Matrix
3838
run: dotnet run --project ./.build -- GenerateMatrix
@@ -64,7 +64,7 @@ jobs:
6464
dotnet-version: |
6565
8.x
6666
9.x
67-
10.x
67+
10.0.100-rc.1.25451.107
6868
6969
- name: Run Build
7070
id: run-build
@@ -137,7 +137,7 @@ jobs:
137137
with:
138138
token: ${{ secrets.CODECOV_TOKEN }}
139139
name: graphql-platform
140-
files: './output/download/coverage-*/*/coverage.opencover.xml'
140+
files: "./output/download/coverage-*/*/coverage.opencover.xml"
141141
disable_search: true
142142
flags: unittests
143143
fail_ci_if_error: true

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
dotnet-version: |
2929
8.x
3030
9.x
31-
10.x
31+
10.0.100-rc.1.25451.107
3232
3333
- name: 🏷 Get the version from tag
3434
run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
@@ -104,7 +104,7 @@ jobs:
104104
- name: 🛠 Install .NET
105105
uses: actions/setup-dotnet@v4
106106
with:
107-
dotnet-version: 10.x
107+
dotnet-version: 10.0.100-rc.1.25451.107
108108

109109
- name: 🏷 Get the version from tag (Windows)
110110
if: runner.os == 'Windows'

src/All.slnx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
<Project Path="HotChocolate/AspNetCore/src/Transport.Sockets.Client/HotChocolate.Transport.Sockets.Client.csproj" />
4848
<Project Path="HotChocolate/AspNetCore/src/Transport.Sockets/HotChocolate.Transport.Sockets.csproj" />
4949
</Folder>
50-
<Folder Name="/HotChocolate/AspNetCore/src/AspNetCore/" />
5150
<Folder Name="/HotChocolate/AspNetCore/test/">
5251
<Project Path="HotChocolate/AspNetCore/test/AspNetCore.Authorization.Opa.Tests/HotChocolate.AspNetCore.Authorization.Opa.Tests.csproj" />
5352
<Project Path="HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/HotChocolate.AspNetCore.Authorization.Tests.csproj" />
@@ -108,6 +107,7 @@
108107
<Project Path="HotChocolate/Core/src/Types.Scalars.Upload/HotChocolate.Types.Scalars.Upload.csproj" />
109108
<Project Path="HotChocolate/Core/src/Types.Scalars/HotChocolate.Types.Scalars.csproj" />
110109
<Project Path="HotChocolate/Core/src/Types.Shared/HotChocolate.Types.Shared.csproj" />
110+
<Project Path="HotChocolate/Core/src/Types.Validation/HotChocolate.Types.Validation.csproj" />
111111
<Project Path="HotChocolate/Core/src/Types/HotChocolate.Types.csproj" />
112112
<Project Path="HotChocolate/Core/src/Validation/HotChocolate.Validation.csproj" />
113113
</Folder>
@@ -137,6 +137,7 @@
137137
<Project Path="HotChocolate/Core/test/Types.Scalars.Tests/HotChocolate.Types.Scalars.Tests.csproj" />
138138
<Project Path="HotChocolate/Core/test/Types.Tests.Documentation/HotChocolate.Types.Tests.Documentation.csproj" />
139139
<Project Path="HotChocolate/Core/test/Types.Tests/HotChocolate.Types.Tests.csproj" />
140+
<Project Path="HotChocolate/Core/test/Types.Validation.Tests/HotChocolate.Types.Validation.Tests.csproj" />
140141
<Project Path="HotChocolate/Core/test/Utilities/HotChocolate.Tests.Utilities.csproj" />
141142
<Project Path="HotChocolate/Core/test/Validation.Tests/HotChocolate.Validation.Tests.csproj" />
142143
</Folder>
@@ -175,6 +176,9 @@
175176
<Project Path="HotChocolate/Diagnostics/test/Diagnostics.Tests/HotChocolate.Diagnostics.Tests.csproj" />
176177
</Folder>
177178
<Folder Name="/HotChocolate/Fusion-vnext/" />
179+
<Folder Name="/HotChocolate/Fusion-vnext/benchmarks/">
180+
<Project Path="HotChocolate/Fusion-vnext/benchmarks/Fusion.Execution.Benchmarks/Fusion.Execution.Benchmarks.csproj" />
181+
</Folder>
178182
<Folder Name="/HotChocolate/Fusion-vnext/src/">
179183
<Project Path="HotChocolate/Fusion-vnext/src/Fusion.Aspire/HotChocolate.Fusion.Aspire.csproj" />
180184
<Project Path="HotChocolate/Fusion-vnext/src/Fusion.AspNetCore/HotChocolate.Fusion.AspNetCore.csproj" />
@@ -188,12 +192,21 @@
188192
<Folder Name="/HotChocolate/Fusion-vnext/test/">
189193
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/HotChocolate.Fusion.AspNetCore.Tests.csproj" />
190194
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Composition.Tests/HotChocolate.Fusion.Composition.Tests.csproj" />
191-
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/HotChocolate.Fusion.Execution.Tests.csproj" />
192195
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.EventSources.Tests/HotChocolate.Fusion.EventSources.Tests.csproj" />
196+
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/HotChocolate.Fusion.Execution.Tests.csproj" />
193197
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Language.Tests/HotChocolate.Fusion.Language.Tests.csproj" />
194198
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Packaging.Tests/HotChocolate.Fusion.Packaging.Tests.csproj" />
195-
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Utilities.Tests/HotChocolate.Fusion.Utilities.Tests.csproj" />
196199
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Tests.Shared/HotChocolate.Fusion.Tests.Shared.csproj" />
200+
<Project Path="HotChocolate/Fusion-vnext/test/Fusion.Utilities.Tests/HotChocolate.Fusion.Utilities.Tests.csproj" />
201+
</Folder>
202+
<Folder Name="/HotChocolate/Json/" />
203+
<Folder Name="/HotChocolate/Json/src/" />
204+
<Folder Name="/HotChocolate/Json/src/Json/">
205+
<Project Path="HotChocolate/Json/src/Json/HotChocolate.Text.Json.csproj" />
206+
</Folder>
207+
<Folder Name="/HotChocolate/Json/test/" />
208+
<Folder Name="/HotChocolate/Json/test/Json.Tests/">
209+
<Project Path="HotChocolate/Json/test/Json.Tests/HotChocolate.Text.Json.Tests.csproj" />
197210
</Folder>
198211
<Folder Name="/HotChocolate/Language/" />
199212
<Folder Name="/HotChocolate/Language/src/">
@@ -288,12 +301,12 @@
288301
</Folder>
289302
<Folder Name="/HotChocolate/Utilities/" />
290303
<Folder Name="/HotChocolate/Utilities/src/">
304+
<Project Path="HotChocolate/Utilities/src/Utilities.Base36/HotChocolate.Utilities.Base36.csproj" />
291305
<Project Path="HotChocolate/Utilities/src/Utilities.Buffers/HotChocolate.Utilities.Buffers.csproj" />
292306
<Project Path="HotChocolate/Utilities/src/Utilities.DependencyInjection/HotChocolate.Utilities.DependencyInjection.csproj" />
293307
<Project Path="HotChocolate/Utilities/src/Utilities.Introspection/HotChocolate.Utilities.Introspection.csproj" />
294308
<Project Path="HotChocolate/Utilities/src/Utilities.Tasks/HotChocolate.Utilities.Tasks.csproj" />
295309
<Project Path="HotChocolate/Utilities/src/Utilities/HotChocolate.Utilities.csproj" />
296-
<Project Path="HotChocolate/Utilities/src/Utilities.Base36/HotChocolate.Utilities.Base36.csproj" />
297310
</Folder>
298311
<Folder Name="/HotChocolate/Utilities/test/">
299312
<Project Path="HotChocolate/Utilities/test/Utilities.Introspection.Tests/HotChocolate.Utilities.Introspection.Tests.csproj" />
@@ -353,4 +366,4 @@
353366
<Folder Name="/StrawberryShake/Tooling/test/">
354367
<Project Path="StrawberryShake/Tooling/test/Configuration.Tests/StrawberryShake.Tools.Configuration.Tests.csproj" />
355368
</Folder>
356-
</Solution>
369+
</Solution>

src/CookieCrumble/src/CookieCrumble/Extensions/SnapshotExtensions.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,45 @@ public static void MatchInlineSnapshot(
1010
ISnapshotValueFormatter? formatter = null)
1111
=> Snapshot.Create().Add(value, formatter: formatter).MatchInline(snapshot);
1212

13+
public static void MatchInlineSnapshots(
14+
this IEnumerable<object?> values,
15+
IEnumerable<string> snapshots,
16+
ISnapshotValueFormatter? formatter = null)
17+
{
18+
var valuesArray = values.ToArray();
19+
var snapshotsArray = snapshots.ToArray();
20+
21+
if (valuesArray.Length != snapshotsArray.Length)
22+
{
23+
throw new ArgumentException(
24+
$"The number of snapshots must be the same as the number of values ({valuesArray.Length}).",
25+
nameof(snapshots));
26+
}
27+
28+
var i = 0;
29+
List<Exception> exceptions = [];
30+
31+
foreach (var value in valuesArray)
32+
{
33+
try
34+
{
35+
Snapshot
36+
.Create()
37+
.Add(value, formatter: formatter)
38+
.MatchInline(snapshotsArray[i++]);
39+
}
40+
catch (Exception ex)
41+
{
42+
exceptions.Add(ex);
43+
}
44+
}
45+
46+
if (exceptions.Count != 0)
47+
{
48+
throw new AggregateException(exceptions);
49+
}
50+
}
51+
1352
public static void MatchSnapshot(this Snapshot value)
1453
=> value.Match();
1554

src/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
<PackageVersion Include="RabbitMQ.Client" Version="6.4.0" />
5151
<PackageVersion Include="RavenDB.Client" Version="6.0.104" />
5252
<PackageVersion Include="Snapshooter.Xunit" Version="0.5.4" />
53-
<PackageVersion Include="Spectre.Console.Json" Version="0.50.0" />
54-
<PackageVersion Include="Spectre.Console" Version="0.50.0" />
53+
<PackageVersion Include="Spectre.Console.Json" Version="0.52.0" />
54+
<PackageVersion Include="Spectre.Console" Version="0.52.0" />
5555
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
5656
<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="2.1.11" />
5757
<PackageVersion Include="Squadron.AzureStorage" Version="0.25.0-preview.2" />
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
namespace HotChocolate.ApolloFederation;
77

8-
public class BuiltInTypesSharableTests
8+
public class BuiltInTypesShareableTests
99
{
1010
[Fact]
11-
public async Task Ensure_PagingInfo_Is_Sharable()
11+
public async Task Ensure_PagingInfo_Is_Shareable()
1212
{
1313
// arrange
1414
var schema = await new ServiceCollection()
@@ -22,7 +22,7 @@ public async Task Ensure_PagingInfo_Is_Sharable()
2222
}
2323

2424
[Fact]
25-
public async Task Ensure_PagingInfo_Is_Sharable_When_Sharable_Already_Registered()
25+
public async Task Ensure_PagingInfo_Is_Shareable_When_Shareable_Already_Registered()
2626
{
2727
// arrange
2828
var schema = await new ServiceCollection()

src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverForInterfaceTests.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public interface ITypeWithReferenceResolver
309309
string Id { get; set; }
310310
string SomeField { get; set; }
311311

312-
public static ITypeWithReferenceResolver Get([LocalState] ObjectValueNode data)
312+
static ITypeWithReferenceResolver Get([LocalState] ObjectValueNode data)
313313
{
314314
return new TypeWithReferenceResolver { Id = "1", SomeField = "SomeField" };
315315
}
@@ -330,15 +330,15 @@ public static TypeWithReferenceResolver Get([LocalState] ObjectValueNode data)
330330
public interface IForeignType
331331
{
332332
[Key]
333-
public string Id { get; }
333+
string Id { get; }
334334

335335
[External]
336-
public string SomeExternalField { get; }
336+
string SomeExternalField { get; }
337337

338-
public string InternalField => "InternalValue";
338+
string InternalField => "InternalValue";
339339

340340
[ReferenceResolver]
341-
public static IForeignType GetById(string id, string someExternalField)
341+
static IForeignType GetById(string id, string someExternalField)
342342
=> new ForeignType(id, someExternalField);
343343
}
344344

@@ -366,15 +366,15 @@ public static ForeignType GetById(string id, string someExternalField)
366366
public interface IMixedFieldTypes
367367
{
368368
[Key]
369-
public string Id { get; }
369+
string Id { get; }
370370

371371
[External]
372-
public int IntField { get; }
372+
int IntField { get; }
373373

374-
public string InternalField { get; set; }
374+
string InternalField { get; set; }
375375

376376
[ReferenceResolver]
377-
public static IMixedFieldTypes GetByExternal(string id, int intField)
377+
static IMixedFieldTypes GetByExternal(string id, int intField)
378378
=> new MixedFieldTypes(id, intField);
379379
}
380380

@@ -407,7 +407,7 @@ public interface IFederatedType
407407
string SomeField { get; set; }
408408

409409
[ReferenceResolver]
410-
public static async Task<IFederatedType?> GetById(
410+
static async Task<IFederatedType?> GetById(
411411
[LocalState] ObjectValueNode data,
412412
[Service] IFederatedTypeDataLoader loader)
413413
{
@@ -473,7 +473,7 @@ public interface IFederatedTypeWithRequiredDetail
473473
FederatedTypeDetail Detail { get; set; }
474474

475475
[ReferenceResolver]
476-
public static IFederatedTypeWithRequiredDetail ReferenceResolver([Map("detail.id")] string detailId)
476+
static IFederatedTypeWithRequiredDetail ReferenceResolver([Map("detail.id")] string detailId)
477477
=> new FederatedTypeWithRequiredDetail()
478478
{
479479
Id = detailId,
@@ -509,7 +509,7 @@ public interface IFederatedTypeWithOptionalDetail
509509
FederatedTypeDetail? Detail { get; }
510510

511511
[ReferenceResolver]
512-
public static IFederatedTypeWithOptionalDetail ReferenceResolver([Map("detail.id")] string detailId)
512+
static IFederatedTypeWithOptionalDetail ReferenceResolver([Map("detail.id")] string detailId)
513513
=> new FederatedTypeWithOptionalDetail()
514514
{
515515
Id = detailId,

0 commit comments

Comments
 (0)