title: http://localhost:49915/api/graphql not working on updating the Route of GraphQL controller
body: <p>I updated the Route value from [Route("[controller]")] to [Route("api/graphql")] for the below mentioned GraphQLController.</p>
  
  <pre><code>[Route("api/graphql")]
  public class GraphQLController : Controller
  {
      private readonly IDocumentExecuter _documentExecuter;
      private readonly ISchema _schema;
      public GraphQLController(ISchema schema, IDocumentExecuter documentExecuter)
      {
          _schema = schema;
          _documentExecuter = documentExecuter;
      }
  
      [HttpPost]
      public async Task&lt;IActionResult&gt; Post([FromBody] GraphQLQuery query)
      {
          if (query == null)
          {
              throw new ArgumentNullException(nameof(query));
          }
  
          if (string.IsNullOrWhiteSpace(query.Query))
          {
              throw new ExecutionError("A query is required.");
          }
  
          var inputs = query.Variables.ToInputs();
          var executionOptions = new ExecutionOptions{Schema = _schema, Query = query.Query, Inputs = inputs};
          var result = await _documentExecuter.ExecuteAsync(executionOptions).ConfigureAwait(false);
          if (result.Errors?.Count &gt; 0)
          {
              return BadRequest(result);
          }
  
          return Ok(result);
      }
  }
  </code></pre>
  
  <p>Here goes the Startup.cs which has the code for Graphiql:
  //Startup.cs</p>
  
  <pre><code>public class Startup
  {
      public Startup(IConfiguration configuration)
      {
          Configuration = configuration;
      }
  
      public IConfiguration Configuration
      {
          get;
      }
  
      // This method gets called by the runtime. Use this method to add services to the container.
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddMvc();
          //services.AddDbContext&lt;NHLStatsContext&gt;(options =&gt; options.UseSqlServer(Configuration["ConnectionStrings:NHLStatsDb"]));
          services.AddDbContext&lt;NHLStatsContext&gt;(options =&gt; options.UseSqlServer(Configuration.GetConnectionString("NHLStatsDb")));
          services.AddTransient&lt;IPlayerRepository, PlayerRepository&gt;();
          services.AddTransient&lt;ISkaterStatisticRepository, SkaterStatisticRepository&gt;();
          services.AddSingleton&lt;IDocumentExecuter, DocumentExecuter&gt;();
          services.AddSingleton&lt;NHLStatsQuery&gt;();
          services.AddSingleton&lt;NHLStatsMutation&gt;();
          services.AddSingleton&lt;PlayerType&gt;();
          services.AddSingleton&lt;PlayerInputType&gt;();
          services.AddSingleton&lt;SkaterStatisticType&gt;();
          var sp = services.BuildServiceProvider();
          services.AddSingleton&lt;ISchema&gt;(new NHLStatsSchema(new FuncDependencyResolver(type =&gt; sp.GetService(type))));
      }
  
      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IHostingEnvironment env, NHLStatsContext db)
      {
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
  
          app.UseGraphiQl();
          app.UseMvc();
          db.EnsureSeedData();
      }
  }
  </code></pre>
  
  <p>With the above changes I executed the APIServer and then navigated to the url: <a href="http://localhost:49915/api/graphql" rel="nofollow noreferrer">http://localhost:49915/api/graphql</a> and found the error with message: This localhost page can’t be found</p>
  
  <p>If I try to open the URL : <a href="http://localhost:49915/graphql" rel="nofollow noreferrer">http://localhost:49915/graphql</a>, it opens the Graphiql editor but with schema missing on the left hand side of the Graphiql editor.</p>
  
  <p>Can anyone help me to fix this issue?</p>