File tree Expand file tree Collapse file tree 4 files changed +12
-16
lines changed Expand file tree Collapse file tree 4 files changed +12
-16
lines changed Original file line number Diff line number Diff line change 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'" >
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1616using GraphQL . Server . Transports . AspNetCore ;
1717using GraphQL . Server . Ui . GraphiQL ;
1818using GraphQL . Validation ;
19+ using GraphQL . Server ;
1920
2021namespace 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 ( ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const CI = process.env.CI && process.env.CI.toString().toLowerCase() === 'true';
1515
1616const artifacts = path . resolve ( './artifacts' ) ;
1717
18- const versionSuffix = '-alpha- '
18+ const versionSuffix = ''
1919
2020export default {
2121 appVeyorJobId,
You can’t perform that action at this time.
0 commit comments