< Summary

Information
Class: Server.Schema.UserMutation
Assembly: Server
File(s): /home/runner/work/NGql/NGql/src/Server/Schema/UserMutation.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 22
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/NGql/NGql/src/Server/Schema/UserMutation.cs

#LineLine coverage
 1using GraphQL;
 2using GraphQL.Types;
 3using MediatR;
 4using Server.Commands;
 5
 6namespace Server.Schema;
 7
 8public sealed class UserMutation : ObjectGraphType<object>
 9{
 610    public UserMutation(ISender sender)
 11    {
 612        Field<UserType>("createUser")
 613            .Arguments(new QueryArguments(
 614                new QueryArgument<StringGraphType> { Name = "name" }
 615            ))
 616            .ResolveAsync(async context =>
 617            {
 618                var name = context.GetArgument<string>("name");
 619                return await sender.Send(new CreateUserCommand(name));
 1220            });
 621    }
 22}

Methods/Properties

.ctor(MediatR.ISender)