Skip to content

Commit e2febe9

Browse files
committed
Rollback to MapGraphQL
1 parent aaa264c commit e2febe9

File tree

1 file changed

+5
-6
lines changed
  • Source/GraphQLTemplate/Source/GraphQLTemplate

1 file changed

+5
-6
lines changed

Source/GraphQLTemplate/Source/GraphQLTemplate/Startup.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace GraphQLTemplate
44
#if CORS
55
using GraphQLTemplate.Constants;
66
#endif
7+
using HotChocolate.AspNetCore;
78
using Microsoft.AspNetCore.Builder;
89
#if HealthCheck
910
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
@@ -124,12 +125,10 @@ public virtual void Configure(IApplicationBuilder application) =>
124125
.UseEndpoints(
125126
builder =>
126127
{
127-
// Map the GraphQL endpoint at /graphql.
128-
builder.MapGraphQLHttp();
129-
// Map the GraphQL subscriptions websocket endpoint at /graphql/ws.
130-
builder.MapGraphQLWebSocket();
131-
// Map the GraphQL schema SDL endpoint at /graphql/sdl
132-
builder.MapGraphQLSchema();
128+
var options = new GraphQLServerOptions();
129+
options.Tool.Enable = false;
130+
// Map the GraphQL HTTP and web socket endpoint at /graphql.
131+
builder.MapGraphQL().WithOptions(options);
133132

134133
if (this.webHostEnvironment.IsDevelopment())
135134
{

0 commit comments

Comments
 (0)