using System.Threading.Tasks;
using GraphQL.Client.Http;
using GraphQL.Client.Serializer.Newtonsoft;
namespace GraphQL.Client.Example;
public static class Program
public static async Task Main()
using var graphQLClient = new GraphQLHttpClient("test", new NewtonsoftJsonSerializer());
var companySlug = "alexanderh";
var projectSlug = "test-678";
graphQLClient.HttpClient.DefaultRequestHeaders.Add("X-Client-ID", clientID);
graphQLClient.HttpClient.DefaultRequestHeaders.Add("X-Client-Secret", clientSecret);
var personAndFilmsRequest = new GraphQLRequest
mutation createSurveyResponseExportBySlug($companySlug: String!, $projectSlug: String!, $format: SurveyResponseExportFormat!, $version: String!) {
mutationData: createSurveyResponseExportBySlug(
input: { companySlug: $companySlug, projectSlug: $projectSlug, format: $format, version : $version}
OperationName = "createSurveyResponseExportBySlug",
Variables = new {companySlug, projectSlug, format, version
var graphQLResponse = await graphQLClient.SendMutationAsync<CreateSurveyResponseExportResult>(personAndFilmsRequest);
Console.WriteLine("raw response:");
Console.WriteLine(JsonSerializer.Serialize(graphQLResponse, new JsonSerializerOptions { WriteIndented = true }));
public class CreateSurveyResponseExportResult
public string url { get; set; }