Skip to content

Commit 11c319d

Browse files
authored
Bump to 2.0 release (#12)
1 parent 785d409 commit 11c319d

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

src/GraphQL.Authorization/GraphQL.Authorization.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</ItemGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="GraphQL" Version="2.0.0-alpha-912" />
27+
<PackageReference Include="GraphQL" Version="2.0.0" />
2828
</ItemGroup>
2929

3030
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">

src/Harness/Harness.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="GraphQL" Version="2.0.0-alpha-931" />
17-
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="3.1.0-alpha0022" />
18-
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="3.1.0-alpha0022" />
16+
<PackageReference Include="GraphQL" Version="2.0.0" />
17+
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="3.1.0" />
18+
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="3.1.0" />
1919
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
2020
</ItemGroup>
2121

src/Harness/Startup.cs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using GraphQL.Server.Transports.AspNetCore;
1717
using GraphQL.Server.Ui.GraphiQL;
1818
using GraphQL.Validation;
19+
using GraphQL.Server;
1920

2021
namespace Harness
2122
{
@@ -56,26 +57,21 @@ type Query {
5657
_.AddPolicy("AdminPolicy", p => p.RequireClaim("role", "Admin"));
5758
});
5859

59-
services.AddGraphQLHttp();
60+
services.AddGraphQL(options =>
61+
{
62+
options.ExposeExceptions = true;
63+
}).AddUserContextBuilder(context => new GraphQLUserContext { User = context.User });
6064

6165
services.AddMvc();
6266
}
6367

6468
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
6569
{
66-
if (env.IsDevelopment())
67-
{
68-
app.UseDeveloperExceptionPage();
69-
}
70+
app.UseDeveloperExceptionPage();
7071

7172
var validationRules = app.ApplicationServices.GetServices<IValidationRule>();
7273

73-
var options = new GraphQLHttpOptions();
74-
75-
validationRules.Concat(DocumentValidator.CoreRules()).Apply(options.ValidationRules.Add);
76-
options.BuildUserContext = httpContext => new GraphQLUserContext { User = httpContext.User };
77-
78-
app.UseGraphQLHttp<ISchema>(options);
74+
app.UseGraphQL<ISchema>("/graphql");
7975
app.UseGraphiQLServer(new GraphiQLOptions());
8076

8177
app.UseMvc();

tools/tasks/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const CI = process.env.CI && process.env.CI.toString().toLowerCase() === 'true';
1515

1616
const artifacts = path.resolve('./artifacts');
1717

18-
const versionSuffix = '-alpha-'
18+
const versionSuffix = ''
1919

2020
export default {
2121
appVeyorJobId,

0 commit comments

Comments
 (0)