Skip to content

Commit

Permalink
Upgrade GraphQL to 7.0.2 (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
myty authored Oct 7, 2022
1 parent 74f8400 commit 9cf539c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 25 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ jobs:
- ubuntu-latest
- windows-latest
graphqlversion:
- 5.1.1
- 5.2.0
- 5.3.1
- 7.0.2
- 7.1.1
steps:
- name: Checkout source
uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions src/GraphQL.Relay.StarWars/GraphQL.Relay.StarWars.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GraphQL.MicrosoftDI" Version="5.3.1" />
<PackageReference Include="GraphQL.SystemTextJson" Version="5.3.1" />
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="6.1.0" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="6.1.0" />
<PackageReference Include="GraphQL.MicrosoftDI" Version="7.0.2" />
<PackageReference Include="GraphQL.SystemTextJson" Version="7.0.2" />
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="7.1.1" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="7.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

Expand Down
7 changes: 2 additions & 5 deletions src/GraphQL.Relay.StarWars/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using GraphQL.MicrosoftDI;
using GraphQL.Relay.StarWars.Api;
using GraphQL.Relay.StarWars.Types;
using GraphQL.Relay.Types;
using GraphQL.Server;
using GraphQL.SystemTextJson;
using GraphQL.Types.Relay;

namespace GraphQL.Relay.StarWars
Expand All @@ -28,8 +25,8 @@ public void ConfigureServices(IServiceCollection services)

services.AddGraphQL(b => b
.AddApolloTracing(true)
.AddHttpMiddleware<StarWarsSchema>()
.AddSchema<StarWarsSchema>()
.AddAutoClrMappings()
.AddSystemTextJson()
.AddErrorInfoProvider(options => options.ExposeExceptionStackTrace = true)
.AddGraphTypes(typeof(StarWarsSchema).Assembly));
Expand All @@ -43,7 +40,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseDeveloperExceptionPage();
}

app.UseGraphQL<StarWarsSchema>();
app.UseGraphQL();
app.UseGraphQLGraphiQL();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL.Relay.Test/GraphQL.Relay.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<GraphQLTestVersion>5.1.1</GraphQLTestVersion>
<GraphQLTestVersion>7.0.2</GraphQLTestVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/GraphQL.Relay.Todo/GraphQL.Relay.Todo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GraphQL.MicrosoftDI" Version="5.3.1" />
<PackageReference Include="GraphQL.SystemTextJson" Version="5.3.1" />
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="6.1.0" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="6.1.0" />
<PackageReference Include="GraphQL.MicrosoftDI" Version="7.0.2" />
<PackageReference Include="GraphQL.SystemTextJson" Version="7.0.2" />
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="7.1.1" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="7.1.1" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.9" />
</ItemGroup>

Expand Down
10 changes: 3 additions & 7 deletions src/GraphQL.Relay.Todo/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System.Text;
using GraphQL.MicrosoftDI;
using GraphQL.Relay.Todo.Schema;
using GraphQL.Server;
using GraphQL.SystemTextJson;

namespace GraphQL.Relay.Todo
{
Expand All @@ -12,11 +9,10 @@ public void ConfigureServices(IServiceCollection services)
{
services.AddGraphQL(b => b
.AddApolloTracing(true)
.AddHttpMiddleware<TodoSchema>()
.AddSchema<TodoSchema>()
.AddAutoClrMappings()
.AddSystemTextJson()
.AddErrorInfoProvider(options => options.ExposeExceptionStackTrace = true)
.AddSystemTextJson());
.AddErrorInfoProvider(options => options.ExposeExceptionStackTrace = true));
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
Expand All @@ -39,7 +35,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app
.UseStaticFiles()
.UseDefaultFiles()
.UseGraphQL<TodoSchema>()
.UseGraphQL()
.UseGraphQLGraphiQL();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL.Relay/GraphQL.Relay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GraphQL" Version="5.1.1" />
<PackageReference Include="GraphQL" Version="7.0.2" />
</ItemGroup>

</Project>

0 comments on commit 9cf539c

Please sign in to comment.