public async Task Given_graph_When_running_it_Then_receive_trace() { var testHttpclient = SetupTestHostAndClient(); var graphQlClient = new PolicyExampleGraphQLClient(testHttpclient); var client = graphQlClient.Client; var createLogicGraphCommand = new CreateLogicGraphCommand() { Id = "abc", Name = "new graph", ProvidedContexts = new List <string> { "a", "b", "c" } }; var res = await graphQlClient.Execute(createLogicGraphCommand); var graphId = res.LogicGraphId; var createLogicNodeCommand = new CreateLogicNodeCommand() { Id = "2", Name = "root node", LogicGraphId = graphId }; var nodeResult = await graphQlClient.Execute(createLogicNodeCommand); var runGraphCommand = new RunLogicGraphCommand() { Id = "3", LogicGraphId = graphId }; var runResult = await graphQlClient.Execute(runGraphCommand); runResult.RunReport.Trace.Should().NotBeNullOrEmpty(); }
public async Task <CreateLogicGraphResult> Execute(CreateLogicGraphCommand command) { var logicGraphCreationRequest = new GraphQLRequest { Query = @" mutation CreateNewGraph($command: CreateLogicGraphCommand) { createNewLogicGraph(command: $command){ success errors ... on CreateLogicGraphResult{ logicGraphId } } }", Variables = new { command } }; var res = await Client.SendMutationAsync <CreateNewGraphRootObject>(logicGraphCreationRequest); ValidateResponse(res); return(res.Data.createNewLogicGraph); }