• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Shane32 / GraphQL.DI / 10466283604

20 Aug 2024 06:13AM UTC coverage: 91.304% (-0.5%) from 91.803%
10466283604

push

github

web-flow
Bump to GraphQL.NET v8 (#23)

59 of 70 branches covered (84.29%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

109 of 114 relevant lines covered (95.61%)

31.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.66
/src/GraphQL.DI/DIObjectGraphBase.cs
1
using System.Security.Claims;
2
using GraphQL.Execution;
3
using GraphQL.Instrumentation;
4
using GraphQL.Types;
5
using GraphQLParser.AST;
6

7
namespace GraphQL.DI;
8

9
/// <summary>
10
/// This is a required base type of all DI-created graph types. <see cref="DIObjectGraphBase"/> may be
11
/// used if the <see cref="IResolveFieldContext.Source"/> type is <see cref="object"/>.
12
/// </summary>
13
public abstract class DIObjectGraphBase<TSource> : IDIObjectGraphBase<TSource>, IResolveFieldContext<TSource>
14
{
15
    /// <summary>
16
    /// The <see cref="IResolveFieldContext"/> for the current field.
17
    /// </summary>
18
    public IResolveFieldContext Context { get; private set; } = null!;
129✔
19

20
    /// <inheritdoc cref="IResolveFieldContext.Source"/>
21
    public TSource Source => (TSource)Context.Source!;
2✔
22

23
    /// <inheritdoc cref="IResolveFieldContext.CancellationToken"/>
24
    public CancellationToken RequestAborted => Context.CancellationToken;
1✔
25

26
    /// <inheritdoc cref="IProvideUserContext.UserContext"/>
27
    public IDictionary<string, object?> UserContext => Context.UserContext;
1✔
28

29
    /// <inheritdoc cref="IResolveFieldContext.User"/>
30
    public ClaimsPrincipal? User => Context.User;
×
31

32
    /// <inheritdoc cref="IResolveFieldContext.Metrics"/>
33
    public Metrics Metrics => Context.Metrics;
1✔
34

35
    IResolveFieldContext IDIObjectGraphBase.Context { get => Context; set => Context = value; }
64✔
36
    GraphQLField IResolveFieldContext.FieldAst => Context.FieldAst;
1✔
37
    FieldType IResolveFieldContext.FieldDefinition => Context.FieldDefinition;
1✔
38
    IObjectGraphType IResolveFieldContext.ParentType => Context.ParentType;
1✔
39
    IResolveFieldContext IResolveFieldContext.Parent => Context.Parent!;
1✔
40
    IDictionary<string, ArgumentValue>? IResolveFieldContext.Arguments => Context.Arguments;
1✔
41
    object? IResolveFieldContext.RootValue => Context.RootValue;
1✔
42
    object IResolveFieldContext.Source => Context.Source!;
1✔
43
    ISchema IResolveFieldContext.Schema => Context.Schema;
1✔
44
    GraphQLDocument IResolveFieldContext.Document => Context.Document;
1✔
45
    GraphQLOperationDefinition IResolveFieldContext.Operation => Context.Operation;
1✔
46
    Validation.Variables IResolveFieldContext.Variables => Context.Variables;
1✔
47
    CancellationToken IResolveFieldContext.CancellationToken => Context.CancellationToken;
1✔
48
    ExecutionErrors IResolveFieldContext.Errors => Context.Errors;
1✔
49
    IEnumerable<object> IResolveFieldContext.Path => Context.Path;
1✔
50
    IEnumerable<object> IResolveFieldContext.ResponsePath => Context.ResponsePath;
1✔
51
    IServiceProvider IResolveFieldContext.RequestServices => Context.RequestServices!;
1✔
52
    IExecutionArrayPool IResolveFieldContext.ArrayPool => Context.ArrayPool;
1✔
53
    IDictionary<string, DirectiveInfo>? IResolveFieldContext.Directives => Context.Directives;
×
54
    Dictionary<string, (GraphQLField Field, FieldType FieldType)>? IResolveFieldContext.SubFields => Context.SubFields;
1✔
55
    IReadOnlyDictionary<string, object?> IResolveFieldContext.InputExtensions => Context.InputExtensions;
1✔
56
    IDictionary<string, object?> IResolveFieldContext.OutputExtensions => Context.OutputExtensions;
1✔
NEW
57
    IExecutionContext IResolveFieldContext.ExecutionContext => Context.ExecutionContext;
×
58
}
59

60
/// <summary>
61
/// This is a required base type of all DI-created graph types. <see cref="DIObjectGraphBase{TSource}"/> may be
62
/// used when the <see cref="IResolveFieldContext.Source"/> type is not <see cref="object"/>.
63
/// </summary>
64
public abstract class DIObjectGraphBase : DIObjectGraphBase<object>
65
{
66
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc