public async Task Extension_Should_BeMissingMiddleware() { // arrange IRequestExecutor executor = await new ServiceCollection() .AddGraphQL() .AddQueryType <Query>() .AddProjections() .CreateExecptionExecutor(); // act IExecutionResult res1 = await executor.ExecuteAsync( QueryRequestBuilder .New() .SetQuery("{ missingMiddleware { bar baz }}") .Create()); // assert res1.MatchException(); }
public async Task Extension_Should_BeTypeMissMatch() { // arrange IRequestExecutor executor = await new ServiceCollection() .AddGraphQL() .AddQueryType <Query>() .AddSorting() .CreateExecptionExecutor(); // act IExecutionResult res1 = await executor.ExecuteAsync( QueryRequestBuilder .New() .SetQuery("{ typeMissmatch(order: {bar: DESC}) { bar baz }}") .Create()); // assert res1.MatchException(); }