DEV Community


Using proxy with GraphQL.Client in C#

eliasj profile image Elias Johnstone ・1 min read

Here is a short snippet how to set up proxy with GraphQL.Client in C#. In this example I use a local proxy for debugging.

var proxy = new WebProxy
    Address = new Uri($""),

var httpClientHandler = new HttpClientHandler
    Proxy = proxy,

var options = new GraphQLHttpClientOptions
    EndPoint = new Uri(""),
    HttpMessageHandler = httpClientHandler

var graphQLClient = new GraphQLHttpClient(
    new NewtonsoftJsonSerializer()
Enter fullscreen mode Exit fullscreen mode

Discussion (0)

Editor guide