Search code examples
c#.netgraphqlhotchocolate

GraphQL proxy for .NET


I want to be able to have a GraphQL API (.NET) that will accept any request and then forward it to another GraphQL API. Is it possible to do this in some simple manner? Reason for it is that the first API will be adding some additional headers to the request that is being forwarded to the other API.

Anyone has any ideas ?

Thanks !


Solution

  • Does your first API need to process graphql body? If not it sounds like simple REST API controller will be just fine for you. So you can create post-method named graphql and send request to second API inside of it. Graphql body should be manipulated as string because of transfer-only purpose. And core-logic of method will be enrichment of http-headers