Skip to content
Merged
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 @@ -48,7 +48,7 @@
schema.ToSyntaxNode(),
new JsonDocumentOwner(JsonDocument.Parse("{ }"), new EmptyMemoryOwner()));
var configProvider = new TestFusionConfigurationProvider(initialConfig);
var builder = new WebHostBuilder()

Check warning on line 51 in src/HotChocolate/Adapters/test/Adapters.Mcp.Tests/FusionIntegrationTests.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Adapters.Mcp.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)
.ConfigureServices(
services => services
.AddRouting()
Expand All @@ -60,7 +60,7 @@
app => app
.UseRouting()
.UseEndpoints(endpoints => endpoints.MapGraphQLMcp()));
var server = new TestServer(builder);

Check warning on line 63 in src/HotChocolate/Adapters/test/Adapters.Mcp.Tests/FusionIntegrationTests.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Adapters.Mcp.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)
var mcpClient1 = await CreateMcpClientAsync(server.CreateClient());
var mcpClient2 = await CreateMcpClientAsync(server.CreateClient());
var listChangedResetEvent1 = new ManualResetEventSlim(false);
Expand Down Expand Up @@ -133,7 +133,7 @@
new CompositionLog());
var result = schemaComposer.Compose();

var builder = new WebHostBuilder()

Check warning on line 136 in src/HotChocolate/Adapters/test/Adapters.Mcp.Tests/FusionIntegrationTests.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Adapters.Mcp.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)
.ConfigureServices(
services =>
{
Expand Down Expand Up @@ -171,12 +171,12 @@
.UseAuthentication()
.UseEndpoints(endpoints => endpoints.MapGraphQLMcp()));

return new TestServer(builder);

Check warning on line 174 in src/HotChocolate/Adapters/test/Adapters.Mcp.Tests/FusionIntegrationTests.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Adapters.Mcp.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)
}

private static TestServer CreateSubgraph(ITypeDefinition[]? additionalTypes)
{
var builder = new WebHostBuilder()

Check warning on line 179 in src/HotChocolate/Adapters/test/Adapters.Mcp.Tests/FusionIntegrationTests.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Adapters.Mcp.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)
.ConfigureServices(
services =>
{
Expand All @@ -196,6 +196,7 @@
var builder =
services
.AddGraphQLServer()
.AddSourceSchemaDefaults()
.AddAuthorization()
.AddQueryType<TestSchema.Query>()
.AddMutationType<TestSchema.Mutation>()
Expand All @@ -215,7 +216,7 @@
.UseAuthentication()
.UseEndpoints(endpoints => endpoints.MapGraphQL()));

return new TestServer(builder);

Check warning on line 219 in src/HotChocolate/Adapters/test/Adapters.Mcp.Tests/FusionIntegrationTests.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Adapters.Mcp.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)
}

private sealed class TestFusionConfigurationProvider(FusionConfiguration initialConfig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,55 @@
"type": "object",
"properties": {
"any": {
"type": "string",
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "object"
},
{
"type": "array"
}
],
"description": "The `Any` scalar type represents any valid GraphQL value."
},
"base64String": {
"pattern": "\"^(?:[A-Za-z0-9+\\\\/]{4})*(?:[A-Za-z0-9+\\\\/]{2}==|[A-Za-z0-9+\\\\/]{3}=)?$\"",
"type": "string",
"description": "The `Base64String` scalar type represents an array of bytes encoded as a Base64 string."
Comment thread
glen-84 marked this conversation as resolved.
},
"boolean": {
"type": "boolean"
},
"byte": {
"type": "string",
"description": "The `Byte` scalar type represents a signed 8-bit integer."
"type": "integer",
"description": "The `Byte` scalar type represents a signed 8-bit integer.",
"format": "int32"
},
"date": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"",
"type": "string",
"description": "The `Date` scalar type represents a date in UTC."
},
"dateTime": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?(?:[Zz]|[+-]\\\\d{2}:\\\\d{2})$\"",
"type": "string",
"description": "The `DateTime` scalar type represents a date and time with time zone offset information."
},
"decimal": {
"type": "string",
"description": "The `Decimal` scalar type represents a decimal floating-point number with high precision."
"type": "number",
"description": "The `Decimal` scalar type represents a decimal floating-point number with high precision.",
"format": "float"
},
"enum": {
"enum": [
Expand Down Expand Up @@ -99,7 +123,26 @@
"format": "int32"
},
"json": {
"type": "string",
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "object"
},
{
"type": "array"
}
],
"description": "The `Any` scalar type represents any valid GraphQL value."
},
"list": {
Expand All @@ -109,20 +152,24 @@
}
},
"localDate": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"",
"type": "string",
"description": "The `LocalDate` scalar type represents a date without time or time zone information."
},
"localDateTime": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"",
"type": "string",
"description": "The `LocalDateTime` scalar type represents a date and time without time zone information."
},
"localTime": {
"pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"",
"type": "string",
"description": "The `LocalTime` scalar type represents a time of day without date or time zone information."
},
"long": {
"type": "string",
"description": "The `Long` scalar type represents a signed 64-bit integer."
"type": "integer",
"description": "The `Long` scalar type represents a signed 64-bit integer.",
"format": "int32"
Comment thread
glen-84 marked this conversation as resolved.
},
"object": {
"required": [
Expand All @@ -143,6 +190,7 @@
"type": "object",
"properties": {
"field1C": {
"pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"",
"type": "string",
"description": "field1C description"
}
Expand All @@ -155,13 +203,15 @@
}
},
"short": {
"type": "string",
"description": "The `Short` scalar type represents a signed 16-bit integer."
"type": "integer",
"description": "The `Short` scalar type represents a signed 16-bit integer.",
"format": "int32"
},
"string": {
"type": "string"
},
"timeSpan": {
"pattern": "\"^-?P(?:\\\\d+W|(?=\\\\d|T(?:\\\\d|$))(?:\\\\d+Y)?(?:\\\\d+M)?(?:\\\\d+D)?(?:T(?:\\\\d+H)?(?:\\\\d+M)?(?:\\\\d+(?:\\\\.\\\\d+)?S)?)?)$\"",
"type": "string",
"description": "The `TimeSpan` scalar type represents a duration of time."
},
Expand All @@ -177,6 +227,7 @@
"description": "The `URL` scalar type represents a Uniform Resource Locator (URL) as defined by RFC 3986."
},
"uuid": {
"pattern": "\"^[\\\\da-fA-F]{8}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{12}$\"",
"type": "string",
"description": "The `UUID` scalar type represents a Universally Unique Identifier (UUID) as defined by RFC 9562."
}
Expand Down Expand Up @@ -221,13 +272,30 @@
"type": "object",
"properties": {
"any": {
"type": [
"null",
"string"
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "object"
},
{
"type": "array"
}
],
"description": "The `Any` scalar type represents any valid GraphQL value."
},
"base64String": {
"pattern": "\"^(?:[A-Za-z0-9+\\\\/]{4})*(?:[A-Za-z0-9+\\\\/]{2}==|[A-Za-z0-9+\\\\/]{3}=)?$\"",
"type": [
"null",
"string"
Expand All @@ -243,18 +311,21 @@
"byte": {
"type": [
"null",
"string"
"integer"
],
"description": "The `Byte` scalar type represents a signed 8-bit integer."
"description": "The `Byte` scalar type represents a signed 8-bit integer.",
"format": "int32"
},
"date": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"",
"type": [
"null",
"string"
],
"description": "The `Date` scalar type represents a date in UTC."
},
"dateTime": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?(?:[Zz]|[+-]\\\\d{2}:\\\\d{2})$\"",
"type": [
"null",
"string"
Expand All @@ -264,9 +335,10 @@
"decimal": {
"type": [
"null",
"string"
"number"
],
"description": "The `Decimal` scalar type represents a decimal floating-point number with high precision."
"description": "The `Decimal` scalar type represents a decimal floating-point number with high precision.",
"format": "float"
},
"enum": {
"enum": [
Expand Down Expand Up @@ -303,9 +375,25 @@
"format": "int32"
},
"json": {
"type": [
"null",
"string"
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "object"
},
{
"type": "array"
}
],
"description": "The `Any` scalar type represents any valid GraphQL value."
},
Expand All @@ -322,20 +410,23 @@
}
},
"localDate": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"",
"type": [
"null",
"string"
],
"description": "The `LocalDate` scalar type represents a date without time or time zone information."
},
"localDateTime": {
"pattern": "\"^\\\\d{4}-\\\\d{2}-\\\\d{2}[Tt]\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"",
"type": [
"null",
"string"
],
"description": "The `LocalDateTime` scalar type represents a date and time without time zone information."
},
"localTime": {
"pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"",
"type": [
"null",
"string"
Expand All @@ -345,9 +436,10 @@
"long": {
"type": [
"null",
"string"
"integer"
],
"description": "The `Long` scalar type represents a signed 64-bit integer."
"description": "The `Long` scalar type represents a signed 64-bit integer.",
"format": "int32"
},
"object": {
"required": [
Expand Down Expand Up @@ -377,6 +469,7 @@
],
"properties": {
"field1C": {
"pattern": "\"^\\\\d{2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d{1,9})?$\"",
"type": [
"null",
"string"
Expand All @@ -392,9 +485,10 @@
"short": {
"type": [
"null",
"string"
"integer"
],
"description": "The `Short` scalar type represents a signed 16-bit integer."
"description": "The `Short` scalar type represents a signed 16-bit integer.",
"format": "int32"
},
"string": {
"type": [
Expand All @@ -403,6 +497,7 @@
]
},
"timeSpan": {
"pattern": "\"^-?P(?:\\\\d+W|(?=\\\\d|T(?:\\\\d|$))(?:\\\\d+Y)?(?:\\\\d+M)?(?:\\\\d+D)?(?:T(?:\\\\d+H)?(?:\\\\d+M)?(?:\\\\d+(?:\\\\.\\\\d+)?S)?)?)$\"",
"type": [
"null",
"string"
Expand All @@ -423,6 +518,7 @@
"description": "The `URL` scalar type represents a Uniform Resource Locator (URL) as defined by RFC 3986."
},
"uuid": {
"pattern": "\"^[\\\\da-fA-F]{8}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{4}-[\\\\da-fA-F]{12}$\"",
"type": [
"null",
"string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ protected TestServer CreateSourceSchema()
IssuerSigningKey = s_tokenKey
});

services.AddGraphQLServer()
services
.AddGraphQLServer()
.AddSourceSchemaDefaults()
.AddBasicServer();
},
app =>
Expand Down
Loading
Loading