Skip to content

Commit 2a1f1bc

Browse files
authored
Added Service Discovery to Gateway (#6976)
1 parent 1c3a009 commit 2a1f1bc

14 files changed

+47
-26
lines changed

src/HotChocolate/Fusion/src/Abstractions/JsonElementExtensions.cs renamed to src/HotChocolate/Fusion/src/Abstractions/Composition/JsonElementExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Text.Json;
22
using HotChocolate.Utilities;
33

4-
namespace HotChocolate.Fusion;
4+
namespace HotChocolate.Fusion.Composition;
55

66
internal static class JsonElementExtensions
77
{

src/HotChocolate/Fusion/src/Abstractions/SubgraphConfigJson.cs renamed to src/HotChocolate/Fusion/src/Abstractions/Composition/SubgraphConfigJson.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Text.Json;
2-
using HotChocolate.Fusion.Composition;
32

4-
namespace HotChocolate.Fusion;
3+
namespace HotChocolate.Fusion.Composition;
54

65
/// <summary>
76
/// The runtime representation of subgraph-config.json.

src/HotChocolate/Fusion/src/Abstractions/SubgraphConfigJsonSerializer.cs renamed to src/HotChocolate/Fusion/src/Abstractions/Composition/SubgraphConfigJsonSerializer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
using System.Buffers;
22
using System.Text;
33
using System.Text.Json;
4-
using HotChocolate.Fusion.Composition;
54

6-
namespace HotChocolate.Fusion;
5+
namespace HotChocolate.Fusion.Composition;
76

87
/// <summary>
98
/// Represents the formatter for the core subgraph configuration.

src/HotChocolate/Fusion/src/Abstractions/SubgraphConfiguration.cs renamed to src/HotChocolate/Fusion/src/Abstractions/Composition/SubgraphConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ public SubgraphConfiguration(
115115
/// Gets the configuration extension.
116116
/// </summary>
117117
public JsonElement? ConfigurationExtensions { get; }
118-
}
118+
}

src/HotChocolate/Fusion/src/Abstractions/IClientConfiguration.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ namespace HotChocolate.Fusion.Composition;
33
/// <summary>
44
/// Represents a configuration for an HTTP client that can be used to fetch data from a subgraph.
55
/// </summary>
6-
public interface IClientConfiguration
7-
{
8-
}
6+
public interface IClientConfiguration;

src/HotChocolate/Fusion/src/Composition/CompositionContext.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public CompositionContext(
5050
/// Gets the subgraph configurations.
5151
/// </summary>
5252
public IReadOnlyList<SubgraphConfiguration> Configurations { get; }
53-
53+
5454
/// <summary>
5555
/// Gets the composition features.
5656
/// </summary>
@@ -90,7 +90,7 @@ public CompositionContext(
9090
/// Gets a set that can be used to calculate subgraph support of a component.
9191
/// </summary>
9292
public HashSet<string> SupportedBy { get; } = new(StringComparer.OrdinalIgnoreCase);
93-
93+
9494
/// <summary>
9595
/// Gets a map that can be used to store custom context data.
9696
/// </summary>
@@ -132,7 +132,7 @@ public bool TryGetSubgraphMember<T>(
132132
[NotNullWhen(true)] out T? member)
133133
where T : ITypeSystemMember
134134
=> GetSubgraphSchema(subgraphName).TryGetMember(coordinate, out member);
135-
135+
136136
public IEnumerable<T> GetSubgraphMembers<T>(SchemaCoordinate coordinate)
137137
where T : ITypeSystemMember
138138
{
@@ -144,4 +144,4 @@ public IEnumerable<T> GetSubgraphMembers<T>(SchemaCoordinate coordinate)
144144
}
145145
}
146146
}
147-
}
147+
}

src/HotChocolate/Fusion/src/Composition/FusionGraphComposer.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,17 @@ public FusionGraphComposer(
3232
bool fusionTypeSelf = false,
3333
Func<ICompositionLog>? logFactory = null)
3434
: this(
35-
new IEntityEnricher[]
36-
{
35+
[
3736
new RefResolverEntityEnricher(),
3837
new PatternEntityEnricher(),
3938
new RequireEnricher(),
4039
new NodeEntityEnricher(),
41-
},
42-
new ITypeMergeHandler[]
43-
{
40+
],
41+
[
4442
new InterfaceTypeMergeHandler(), new UnionTypeMergeHandler(),
4543
new InputObjectTypeMergeHandler(), new EnumTypeMergeHandler(),
4644
new ScalarTypeMergeHandler(),
47-
},
45+
],
4846
fusionTypePrefix,
4947
fusionTypeSelf,
5048
logFactory)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace HotChocolate.Fusion.Composition.Pipeline;
22

3-
internal interface IMergeMiddleware
3+
internal interface IMergeMiddleware
44
{
55
ValueTask InvokeAsync(CompositionContext context, MergeDelegate next);
66
}

0 commit comments

Comments
 (0)