diff --git a/examples/GraphQL.Client.Example/GraphQL.Client.Example.csproj b/examples/GraphQL.Client.Example/GraphQL.Client.Example.csproj
index 54506df0..8880a7a6 100644
--- a/examples/GraphQL.Client.Example/GraphQL.Client.Example.csproj
+++ b/examples/GraphQL.Client.Example/GraphQL.Client.Example.csproj
@@ -1,14 +1,14 @@
-
- Exe
- netcoreapp3.1
- false
-
+
+ Exe
+ netcoreapp3.1
+ false
+
-
-
-
-
+
+
+
+
diff --git a/examples/GraphQL.Client.Example/PersonAndFilmsResponse.cs b/examples/GraphQL.Client.Example/PersonAndFilmsResponse.cs
index ea3d7de5..eafba6d1 100644
--- a/examples/GraphQL.Client.Example/PersonAndFilmsResponse.cs
+++ b/examples/GraphQL.Client.Example/PersonAndFilmsResponse.cs
@@ -9,6 +9,7 @@ public class PersonAndFilmsResponse
public class PersonContent
{
public string Name { get; set; }
+
public FilmConnectionContent FilmConnection { get; set; }
public class FilmConnectionContent
diff --git a/examples/GraphQL.Client.Example/Program.cs b/examples/GraphQL.Client.Example/Program.cs
index 2ef597ec..0bfd14b1 100644
--- a/examples/GraphQL.Client.Example/Program.cs
+++ b/examples/GraphQL.Client.Example/Program.cs
@@ -7,13 +7,10 @@
namespace GraphQL.Client.Example
{
-
public class Program
{
-
- public static async Task Main(string[] args)
+ public static async Task Main()
{
- _ = args;
using var graphQLClient = new GraphQLHttpClient("https://swapi.apis.guru/", new NewtonsoftJsonSerializer());
var personAndFilmsRequest = new GraphQLRequest
@@ -49,6 +46,5 @@ query PersonAndFilms($id: ID) {
Console.WriteLine("Press any key to quit...");
Console.ReadKey();
}
-
}
}
diff --git a/root.props b/root.props
index 2c0a5b7d..17bd287e 100644
--- a/root.props
+++ b/root.props
@@ -1,39 +1,38 @@
-
-
- Deinok,Alexander Rose,graphql-dotnet
- A GraphQL Client for .NET Standard
- True
- True
- 8.0
- en-US
- CS0618;CS1591;CS1701;CS8618;CS8632;NU5048;NU5105;NU5125
- annotations
- icon.png
- LICENSE.txt
- https://github.com/graphql-dotnet/graphql-client
- true
- GraphQL
- git
- https://github.com/graphql-dotnet/graphql-client
- True
- 4
-
+
+ Deinok,Alexander Rose,graphql-dotnet
+ A GraphQL Client for .NET Standard
+ True
+ True
+ 8.0
+ en-US
+ $(NoWarn);CS1591;NU5048;NU5105;NU5125
+ annotations
+ icon.png
+ LICENSE.txt
+ https://github.com/graphql-dotnet/graphql-client
+ true
+ GraphQL
+ git
+ https://github.com/graphql-dotnet/graphql-client
+ True
+ 4
+
-
-
- PreserveNewest
- true
- LICENSE.txt
- false
-
-
- PreserveNewest
- true
- icon.png
- false
-
-
+
+
+ PreserveNewest
+ true
+ LICENSE.txt
+ false
+
+
+ PreserveNewest
+ true
+ icon.png
+ false
+
+
diff --git a/src/GraphQL.Client.Abstractions.Websocket/GraphQL.Client.Abstractions.Websocket.csproj b/src/GraphQL.Client.Abstractions.Websocket/GraphQL.Client.Abstractions.Websocket.csproj
index 0863c38f..d1980775 100644
--- a/src/GraphQL.Client.Abstractions.Websocket/GraphQL.Client.Abstractions.Websocket.csproj
+++ b/src/GraphQL.Client.Abstractions.Websocket/GraphQL.Client.Abstractions.Websocket.csproj
@@ -1,13 +1,14 @@
-
+
+
-
+
Abstractions for the Websocket transport used in GraphQL.Client
netstandard2.0
-
+
-
-
-
+
+
+
diff --git a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketMessageType.cs b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketMessageType.cs
index 6dd7f019..daa83114 100644
--- a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketMessageType.cs
+++ b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketMessageType.cs
@@ -84,6 +84,5 @@ public static class GraphQLWebSocketMessageType
/// id: string : operation id
///
public const string GQL_STOP = "stop"; // Client -> Server
-
}
}
diff --git a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketRequest.cs b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketRequest.cs
index 7c986acc..623e4271 100644
--- a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketRequest.cs
+++ b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketRequest.cs
@@ -4,7 +4,6 @@
namespace GraphQL.Client.Abstractions.Websocket
{
-
///
/// A Subscription Request
///
@@ -50,7 +49,7 @@ public GraphQLRequest Payload
public Task SendTask() => _tcs.Task;
///
- /// gets called when the send operation for this request has completed sucessfully
+ /// gets called when the send operation for this request has completed successfully
///
public void SendCompleted() => _tcs.SetResult(true);
@@ -109,7 +108,5 @@ public override int GetHashCode()
///
public static bool operator !=(GraphQLWebSocketRequest request1, GraphQLWebSocketRequest request2) => !(request1 == request2);
-
}
-
}
diff --git a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketResponse.cs b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketResponse.cs
index d6c69a70..390834da 100644
--- a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketResponse.cs
+++ b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebSocketResponse.cs
@@ -3,13 +3,11 @@
namespace GraphQL.Client.Abstractions.Websocket
{
-
///
/// A Subscription Response
///
public class GraphQLWebSocketResponse : IEquatable
{
-
///
/// The Identifier of the Response
///
@@ -65,7 +63,6 @@ public override int GetHashCode()
///
public static bool operator !=(GraphQLWebSocketResponse response1, GraphQLWebSocketResponse response2) =>
!(response1 == response2);
-
}
public class GraphQLWebSocketResponse : GraphQLWebSocketResponse, IEquatable>
diff --git a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebsocketConnectionState.cs b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebsocketConnectionState.cs
index 148436cd..c5fd3107 100644
--- a/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebsocketConnectionState.cs
+++ b/src/GraphQL.Client.Abstractions.Websocket/GraphQLWebsocketConnectionState.cs
@@ -3,7 +3,9 @@ namespace GraphQL.Client.Abstractions.Websocket
public enum GraphQLWebsocketConnectionState
{
Disconnected,
+
Connecting,
+
Connected
}
}
diff --git a/src/GraphQL.Client.Abstractions.Websocket/IGraphQLWebsocketJsonSerializer.cs b/src/GraphQL.Client.Abstractions.Websocket/IGraphQLWebsocketJsonSerializer.cs
index 23536db5..5e3d58ec 100644
--- a/src/GraphQL.Client.Abstractions.Websocket/IGraphQLWebsocketJsonSerializer.cs
+++ b/src/GraphQL.Client.Abstractions.Websocket/IGraphQLWebsocketJsonSerializer.cs
@@ -12,7 +12,7 @@ public interface IGraphQLWebsocketJsonSerializer : IGraphQLJsonSerializer
byte[] SerializeToBytes(GraphQLWebSocketRequest request);
Task DeserializeToWebsocketResponseWrapperAsync(Stream stream);
- GraphQLWebSocketResponse> DeserializeToWebsocketResponse(byte[] bytes);
+ GraphQLWebSocketResponse> DeserializeToWebsocketResponse(byte[] bytes);
}
}
diff --git a/src/GraphQL.Client.Abstractions/GraphQL.Client.Abstractions.csproj b/src/GraphQL.Client.Abstractions/GraphQL.Client.Abstractions.csproj
index 63e9aa89..d7678b66 100644
--- a/src/GraphQL.Client.Abstractions/GraphQL.Client.Abstractions.csproj
+++ b/src/GraphQL.Client.Abstractions/GraphQL.Client.Abstractions.csproj
@@ -1,19 +1,18 @@
-
+
-
- Abstractions for GraphQL.Client
- GraphQL.Client.Abstractions
- netstandard2.0
-
+
+ Abstractions for GraphQL.Client
+ netstandard2.0
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/src/GraphQL.Client.Abstractions/IGraphQLClient.cs b/src/GraphQL.Client.Abstractions/IGraphQLClient.cs
index df0557af..0508f8b5 100644
--- a/src/GraphQL.Client.Abstractions/IGraphQLClient.cs
+++ b/src/GraphQL.Client.Abstractions/IGraphQLClient.cs
@@ -5,10 +5,8 @@
namespace GraphQL.Client.Abstractions
{
-
public interface IGraphQLClient : IDisposable
{
-
Task> SendQueryAsync(GraphQLRequest request, CancellationToken cancellationToken = default);
Task> SendMutationAsync(GraphQLRequest request, CancellationToken cancellationToken = default);
@@ -30,9 +28,8 @@ public interface IGraphQLClient : IDisposable
/// Any exception thrown by will cause the sequence to fail.
///
/// the GraphQL request for this subscription
- /// an external handler for all s occuring within the sequence
+ /// an external handler for all s occurring within the sequence
/// an observable stream for the specified subscription
IObservable> CreateSubscriptionStream(GraphQLRequest request, Action exceptionHandler);
}
-
}
diff --git a/src/GraphQL.Client.Abstractions/IGraphQLJsonSerializer.cs b/src/GraphQL.Client.Abstractions/IGraphQLJsonSerializer.cs
index 5c119e4a..fa21dbac 100644
--- a/src/GraphQL.Client.Abstractions/IGraphQLJsonSerializer.cs
+++ b/src/GraphQL.Client.Abstractions/IGraphQLJsonSerializer.cs
@@ -8,9 +8,6 @@ public interface IGraphQLJsonSerializer
{
string SerializeToString(GraphQLRequest request);
- Task> DeserializeFromUtf8StreamAsync(Stream stream,
- CancellationToken cancellationToken);
+ Task> DeserializeFromUtf8StreamAsync(Stream stream, CancellationToken cancellationToken);
}
-
-
}
diff --git a/src/GraphQL.Client.LocalExecution/ExecutionResultExtensions.cs b/src/GraphQL.Client.LocalExecution/ExecutionResultExtensions.cs
deleted file mode 100644
index 32133976..00000000
--- a/src/GraphQL.Client.LocalExecution/ExecutionResultExtensions.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace GraphQL.Client.LocalExecution
-{
- public class ExecutionResultExtensions
- {
-
- }
-}
diff --git a/src/GraphQL.Client.LocalExecution/GraphQL.Client.LocalExecution.csproj b/src/GraphQL.Client.LocalExecution/GraphQL.Client.LocalExecution.csproj
index 927c3470..ebef7ea0 100644
--- a/src/GraphQL.Client.LocalExecution/GraphQL.Client.LocalExecution.csproj
+++ b/src/GraphQL.Client.LocalExecution/GraphQL.Client.LocalExecution.csproj
@@ -1,20 +1,20 @@
-
+
-
- A GraphQL Client which executes the queries directly on a provided GraphQL schema using graphql-dotnet
- netstandard2.0
-
+
+ A GraphQL Client which executes the queries directly on a provided GraphQL schema using graphql-dotnet
+ netstandard2.0
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
diff --git a/src/GraphQL.Client.LocalExecution/GraphQLEnumConverter.cs b/src/GraphQL.Client.LocalExecution/GraphQLEnumConverter.cs
index 89bbcfc0..a02cf935 100644
--- a/src/GraphQL.Client.LocalExecution/GraphQLEnumConverter.cs
+++ b/src/GraphQL.Client.LocalExecution/GraphQLEnumConverter.cs
@@ -34,5 +34,4 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
}
}
}
-
}
diff --git a/src/GraphQL.Client.LocalExecution/GraphQLLocalExecutionClient.cs b/src/GraphQL.Client.LocalExecution/GraphQLLocalExecutionClient.cs
index c055cecb..d458d20e 100644
--- a/src/GraphQL.Client.LocalExecution/GraphQLLocalExecutionClient.cs
+++ b/src/GraphQL.Client.LocalExecution/GraphQLLocalExecutionClient.cs
@@ -22,10 +22,8 @@ public static GraphQLLocalExecutionClient New(TSchema schema,
=> new GraphQLLocalExecutionClient(schema, serializer);
}
-
public class GraphQLLocalExecutionClient : IGraphQLClient where TSchema : ISchema
{
-
private static readonly JsonSerializerSettings _variablesSerializerSettings = new JsonSerializerSettings
{
Formatting = Formatting.Indented,
@@ -38,8 +36,8 @@ public class GraphQLLocalExecutionClient : IGraphQLClient where TSchema
};
public TSchema Schema { get; }
- public IGraphQLJsonSerializer Serializer { get; }
+ public IGraphQLJsonSerializer Serializer { get; }
private readonly DocumentExecuter _documentExecuter;
diff --git a/src/GraphQL.Client.Serializer.Newtonsoft/GraphQL.Client.Serializer.Newtonsoft.csproj b/src/GraphQL.Client.Serializer.Newtonsoft/GraphQL.Client.Serializer.Newtonsoft.csproj
index 530f1757..4bbcb784 100644
--- a/src/GraphQL.Client.Serializer.Newtonsoft/GraphQL.Client.Serializer.Newtonsoft.csproj
+++ b/src/GraphQL.Client.Serializer.Newtonsoft/GraphQL.Client.Serializer.Newtonsoft.csproj
@@ -1,5 +1,6 @@
-
+
+
A serializer implementation for GraphQL.Client using Newtonsoft.Json as underlying JSON library
diff --git a/src/GraphQL.Client.Serializer.Newtonsoft/MapConverter.cs b/src/GraphQL.Client.Serializer.Newtonsoft/MapConverter.cs
index 10a687f4..3caefd5f 100644
--- a/src/GraphQL.Client.Serializer.Newtonsoft/MapConverter.cs
+++ b/src/GraphQL.Client.Serializer.Newtonsoft/MapConverter.cs
@@ -12,13 +12,12 @@ public override void WriteJson(JsonWriter writer, Map value, JsonSerializer seri
throw new NotImplementedException(
"This converter currently is only intended to be used to read a JSON object into a strongly-typed representation.");
- public override Map ReadJson(JsonReader reader, Type objectType, Map existingValue,
- bool hasExistingValue, JsonSerializer serializer)
+ public override Map ReadJson(JsonReader reader, Type objectType, Map existingValue, bool hasExistingValue, JsonSerializer serializer)
{
var rootToken = JToken.ReadFrom(reader);
if (rootToken is JObject)
{
- return ReadDictionary
-
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
diff --git a/tests/GraphQL.Primitives.Tests/GraphQLLocationTest.cs b/tests/GraphQL.Primitives.Tests/GraphQLLocationTest.cs
index ce34bcc8..3d7fde8d 100644
--- a/tests/GraphQL.Primitives.Tests/GraphQLLocationTest.cs
+++ b/tests/GraphQL.Primitives.Tests/GraphQLLocationTest.cs
@@ -2,10 +2,8 @@
namespace GraphQL.Primitives.Tests
{
-
public class GraphQLLocationTest
{
-
[Fact]
public void ConstructorFact()
{
@@ -60,7 +58,5 @@ public void GetHashCodeFact()
var graphQLLocation2 = new GraphQLLocation { Column = 1, Line = 2 };
Assert.True(graphQLLocation1.GetHashCode() == graphQLLocation2.GetHashCode());
}
-
}
-
}
diff --git a/tests/GraphQL.Primitives.Tests/GraphQLRequestTest.cs b/tests/GraphQL.Primitives.Tests/GraphQLRequestTest.cs
index 145ecfa6..e5b41a15 100644
--- a/tests/GraphQL.Primitives.Tests/GraphQLRequestTest.cs
+++ b/tests/GraphQL.Primitives.Tests/GraphQLRequestTest.cs
@@ -2,10 +2,8 @@
namespace GraphQL.Primitives.Tests
{
-
public class GraphQLRequestTest
{
-
[Fact]
public void ConstructorFact()
{
@@ -47,7 +45,6 @@ public void Equality3Fact()
Assert.Equal(graphQLRequest1, graphQLRequest2);
}
-
[Fact]
public void Equality4Fact()
{
@@ -122,11 +119,10 @@ public void PropertyQueryGetFact()
[Fact]
public void PropertyQuerySetFact()
{
- var graphQLRequest =
- new GraphQLRequest("{hero{name}}", new {varName = "varValue1"}, "operationName")
- {
- Query = "{hero{name2}}"
- };
+ var graphQLRequest = new GraphQLRequest("{hero{name}}", new { varName = "varValue1" }, "operationName")
+ {
+ Query = "{hero{name2}}"
+ };
Assert.Equal("{hero{name2}}", graphQLRequest.Query);
}
@@ -147,7 +143,7 @@ public void PropertyOperationNameNullGetFact()
[Fact]
public void PropertyOperationNameSetFact()
{
- var graphQLRequest = new GraphQLRequest("{hero{name}}", new {varName = "varValue"}, "operationName1")
+ var graphQLRequest = new GraphQLRequest("{hero{name}}", new { varName = "varValue" }, "operationName1")
{
OperationName = "operationName2"
};
@@ -171,16 +167,17 @@ public void PropertyVariableNullGetFact()
[Fact]
public void PropertyVariableSetFact()
{
- var graphQLRequest = new GraphQLRequest("{hero{name}}", new {varName = "varValue1"}, "operationName1")
+ var graphQLRequest = new GraphQLRequest("{hero{name}}", new { varName = "varValue1" }, "operationName1")
{
- Variables = new {varName = "varValue2"}
+ Variables = new
+ {
+ varName = "varValue2"
+ }
};
Assert.Equal(new
{
varName = "varValue2"
}, graphQLRequest.Variables);
}
-
}
-
}
diff --git a/tests/GraphQL.Primitives.Tests/GraphQLResponseTest.cs b/tests/GraphQL.Primitives.Tests/GraphQLResponseTest.cs
index ed23f3fd..ce062e05 100644
--- a/tests/GraphQL.Primitives.Tests/GraphQLResponseTest.cs
+++ b/tests/GraphQL.Primitives.Tests/GraphQLResponseTest.cs
@@ -2,10 +2,8 @@
namespace GraphQL.Primitives.Tests
{
-
public class GraphQLResponseTest
{
-
[Fact]
public void Constructor1Fact()
{
@@ -112,7 +110,5 @@ public void GetHashCodeFact()
};
Assert.True(graphQLResponse1.GetHashCode() == graphQLResponse2.GetHashCode());
}
-
}
-
}
diff --git a/tests/GraphQL.Primitives.Tests/JsonSerializationTests.cs b/tests/GraphQL.Primitives.Tests/JsonSerializationTests.cs
index da1ccf02..74add0a1 100644
--- a/tests/GraphQL.Primitives.Tests/JsonSerializationTests.cs
+++ b/tests/GraphQL.Primitives.Tests/JsonSerializationTests.cs
@@ -7,13 +7,13 @@ namespace GraphQL.Primitives.Tests
{
public class JsonSerializationTests
{
-
[Fact]
public void WebSocketResponseDeserialization()
{
var testObject = new ExtendedTestObject { Id = "test", OtherData = "this is some other stuff" };
var json = JsonSerializer.Serialize(testObject);
var deserialized = JsonSerializer.Deserialize(json);
+ deserialized.Id.Should().Be("test");
var dict = JsonSerializer.Deserialize>(json);
var childObject = (JsonElement)dict["ChildObject"];
childObject.GetProperty("Id").GetString().Should().Be(testObject.ChildObject.Id);
@@ -22,7 +22,6 @@ public void WebSocketResponseDeserialization()
public class TestObject
{
public string Id { get; set; }
-
}
public class ExtendedTestObject : TestObject
diff --git a/tests/GraphQL.Server.Test/GraphQL.Server.Test.csproj b/tests/GraphQL.Server.Test/GraphQL.Server.Test.csproj
index 8ae5718c..ad08e233 100644
--- a/tests/GraphQL.Server.Test/GraphQL.Server.Test.csproj
+++ b/tests/GraphQL.Server.Test/GraphQL.Server.Test.csproj
@@ -1,13 +1,13 @@
-
+
-
- netcoreapp3.1
-
+
+ netcoreapp3.1
+
-
-
-
-
-
+
+
+
+
+
diff --git a/tests/GraphQL.Server.Test/GraphQL/Models/Repository.cs b/tests/GraphQL.Server.Test/GraphQL/Models/Repository.cs
index e387d32b..95e5f1fc 100644
--- a/tests/GraphQL.Server.Test/GraphQL/Models/Repository.cs
+++ b/tests/GraphQL.Server.Test/GraphQL/Models/Repository.cs
@@ -3,19 +3,21 @@
namespace GraphQL.Server.Test.GraphQL.Models
{
-
public class Repository
{
public int DatabaseId { get; set; }
+
public string Id { get; set; }
+
public string Name { get; set; }
+
public object Owner { get; set; }
+
public Uri Url { get; set; }
}
public class RepositoryGraphType : ObjectGraphType
{
-
public RepositoryGraphType()
{
Name = nameof(Repository);
@@ -25,7 +27,5 @@ public RepositoryGraphType()
//this.Field(expression => expression.Owner);
Field>("url");
}
-
}
-
}
diff --git a/tests/GraphQL.Server.Test/GraphQL/Storage.cs b/tests/GraphQL.Server.Test/GraphQL/Storage.cs
index 613a537a..0280b28f 100644
--- a/tests/GraphQL.Server.Test/GraphQL/Storage.cs
+++ b/tests/GraphQL.Server.Test/GraphQL/Storage.cs
@@ -5,10 +5,8 @@
namespace GraphQL.Server.Test.GraphQL
{
-
public static class Storage
{
-
public static IQueryable Repositories { get; } = new List()
.Append(new Repository
{
@@ -19,7 +17,5 @@ public static class Storage
Url = new Uri("https://github.com/graphql-dotnet/graphql-client")
})
.AsQueryable();
-
}
-
}
diff --git a/tests/GraphQL.Server.Test/GraphQL/TestMutation.cs b/tests/GraphQL.Server.Test/GraphQL/TestMutation.cs
index a1077dc6..dfd67981 100644
--- a/tests/GraphQL.Server.Test/GraphQL/TestMutation.cs
+++ b/tests/GraphQL.Server.Test/GraphQL/TestMutation.cs
@@ -2,14 +2,10 @@
namespace GraphQL.Server.Test.GraphQL
{
-
public class TestMutation : ObjectGraphType
{
-
public TestMutation()
{
}
-
}
-
}
diff --git a/tests/GraphQL.Server.Test/GraphQL/TestQuery.cs b/tests/GraphQL.Server.Test/GraphQL/TestQuery.cs
index 2fb39ab3..bf8aa3ae 100644
--- a/tests/GraphQL.Server.Test/GraphQL/TestQuery.cs
+++ b/tests/GraphQL.Server.Test/GraphQL/TestQuery.cs
@@ -4,10 +4,8 @@
namespace GraphQL.Server.Test.GraphQL
{
-
public class TestQuery : ObjectGraphType
{
-
public TestQuery()
{
Field("repository", arguments: new QueryArguments(new QueryArgument> { Name = "owner" }, new QueryArgument> { Name = "name" }), resolve: context =>
@@ -17,7 +15,5 @@ public TestQuery()
return Storage.Repositories.FirstOrDefault(predicate => predicate.Name == name);
});
}
-
}
-
}
diff --git a/tests/GraphQL.Server.Test/GraphQL/TestSchema.cs b/tests/GraphQL.Server.Test/GraphQL/TestSchema.cs
index a61d3558..c589d388 100644
--- a/tests/GraphQL.Server.Test/GraphQL/TestSchema.cs
+++ b/tests/GraphQL.Server.Test/GraphQL/TestSchema.cs
@@ -2,17 +2,13 @@
namespace GraphQL.Server.Test.GraphQL
{
-
public class TestSchema : Schema
{
-
public TestSchema()
{
Query = new TestQuery();
//this.Mutation = new TestMutation();
//this.Subscription = new TestSubscription();
}
-
}
-
}
diff --git a/tests/GraphQL.Server.Test/GraphQL/TestSubscription.cs b/tests/GraphQL.Server.Test/GraphQL/TestSubscription.cs
index f6d50470..4fabf386 100644
--- a/tests/GraphQL.Server.Test/GraphQL/TestSubscription.cs
+++ b/tests/GraphQL.Server.Test/GraphQL/TestSubscription.cs
@@ -2,14 +2,10 @@
namespace GraphQL.Server.Test.GraphQL
{
-
public class TestSubscription : ObjectGraphType
{
-
public TestSubscription()
{
}
-
}
-
}
diff --git a/tests/GraphQL.Server.Test/Program.cs b/tests/GraphQL.Server.Test/Program.cs
index 2b5c329a..df18d888 100644
--- a/tests/GraphQL.Server.Test/Program.cs
+++ b/tests/GraphQL.Server.Test/Program.cs
@@ -4,18 +4,14 @@
namespace GraphQL.Server.Test
{
-
public class Program
{
-
public static async Task Main(string[] args) =>
await CreateHostBuilder(args).Build().RunAsync();
public static IWebHostBuilder CreateHostBuilder(string[] args = null) =>
WebHost.CreateDefaultBuilder(args)
- .UseKestrel(options => { options.AllowSynchronousIO = true; })
+ .UseKestrel(options => options.AllowSynchronousIO = true)
.UseStartup();
-
}
-
}
diff --git a/tests/GraphQL.Server.Test/Startup.cs b/tests/GraphQL.Server.Test/Startup.cs
index d330ed5d..a1f710ee 100644
--- a/tests/GraphQL.Server.Test/Startup.cs
+++ b/tests/GraphQL.Server.Test/Startup.cs
@@ -2,23 +2,13 @@
using GraphQL.Server.Ui.GraphiQL;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace GraphQL.Server.Test
{
-
public class Startup
{
-
- public IConfiguration Configuration { get; }
-
- public Startup(IConfiguration configuration)
- {
- Configuration = configuration;
- }
-
public void Configure(IApplicationBuilder app)
{
var webHostEnvironment = app.ApplicationServices.GetRequiredService();
@@ -43,7 +33,5 @@ public void ConfigureServices(IServiceCollection services)
options.ExposeExceptions = true;
}).AddWebSockets();
}
-
}
-
}
diff --git a/tests/IntegrationTestServer/IntegrationTestServer.csproj b/tests/IntegrationTestServer/IntegrationTestServer.csproj
index a1f28376..da280f0f 100644
--- a/tests/IntegrationTestServer/IntegrationTestServer.csproj
+++ b/tests/IntegrationTestServer/IntegrationTestServer.csproj
@@ -2,6 +2,7 @@
netcoreapp3.1
+ IntegrationTestServer.Program
diff --git a/tests/IntegrationTestServer/Startup.cs b/tests/IntegrationTestServer/Startup.cs
index 71a76d67..49586dc0 100644
--- a/tests/IntegrationTestServer/Startup.cs
+++ b/tests/IntegrationTestServer/Startup.cs
@@ -24,16 +24,14 @@ public Startup(IConfiguration configuration, IWebHostEnvironment environment)
}
public IConfiguration Configuration { get; }
+
public IWebHostEnvironment Environment { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
- services.Configure(options =>
- {
- options.AllowSynchronousIO = true;
- });
+ services.Configure(options => options.AllowSynchronousIO = true);
services.AddTransient(provider => new FuncDependencyResolver(provider.GetService));
services.AddChatSchema();
diff --git a/tests/tests.props b/tests/tests.props
index 46e995fc..19bc6d36 100644
--- a/tests/tests.props
+++ b/tests/tests.props
@@ -1,17 +1,21 @@
-
-
+
-
+
false
- true
-
+ $(NoWarn);NU1701;IDE1006
+
-
-
-
-
-
+
+
+
+
+
+ all
+ runtime;build;native;contentfiles;analyzers;buildtransitive
+
+
+