Issue with GraphQL Kestrel API server C# ASP.NET Core 7

Issue with GraphQL Kestrel API server C# ASP.NET Core 7


0

Here’s the issue: I have an ASP.NET Core 7 Web API listening on https://localhost:5248/sap/opu/odata/GIBSFI/ALERT_SRV, but when a request comes in, it needs to run the request to on https://localhost:5248/sap/opu/odata/GIBSFI/ALERT_SRV/graphql and return the results.

Keep in mind this is a piece of middleware and I can not alter the URL the other app is submitting to. Pretty straight forward Program.cs set up:

var builder = WebApplication.CreateBuilder(args);
builder.Services
    .AddSingleton<Repository>()
    .AddGraphQLServer()
    .AddQueryType<Query>()
    .AddMutationType<Mutation>();
``
var app = builder.Build();
app.UseExceptionHandler("/error");
app.UsePathBase("/sap/opu/odata/GIBSFI/ALERT_SRV");
app.MapGraphQL().AllowAnonymous();

app.Run();

I tried using app.MapGet and app.MapPost but unsure how to create the handlers

New contributor

Steven Tufano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 4 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *