Class GraphQLSchemaCoverageCollector

Namespace
ProtoTest.GraphQL
Assembly
ProtoTest.GraphQL.dll

Collects GraphQL schema coverage: every type, field, argument and input field of the schema, hit or not. A source that is a path on the application (/graphql?sdl) with no address to resolve it against loads from the application once the run's infrastructure started.

public sealed class GraphQLSchemaCoverageCollector : ProtoCoverageCollector, IProtoCollector, IProtoReportSource, IProtoRunHook
Inheritance
GraphQLSchemaCoverageCollector
Implements
Inherited Members
Extension Methods

Constructors

GraphQLSchemaCoverageCollector(string, IConfiguration, IEnumerable<ProtoApplicationTarget>)

public GraphQLSchemaCoverageCollector(string targetName, IConfiguration configuration, IEnumerable<ProtoApplicationTarget> applicationTargets)

Parameters

targetName string
configuration IConfiguration
applicationTargets IEnumerable<ProtoApplicationTarget>

GraphQLSchemaCoverageCollector(string, string)

public GraphQLSchemaCoverageCollector(string targetName, string schemaSource)

Parameters

targetName string
schemaSource string

Properties

Category

public override string Category { get; }

Property Value

string

Methods

CanCollect(ProtoObservation)

Determines whether this collector accepts an observation.

public override bool CanCollect(ProtoObservation observation)

Parameters

observation ProtoObservation

Returns

bool

Collect(ProtoObservation)

Records an incoming observation. Implementations should support concurrent calls when tests or requests execute in parallel.

public override void Collect(ProtoObservation observation)

Parameters

observation ProtoObservation

GetReportItems()

public override IEnumerable<ProtoReportItem> GetReportItems()

Returns

IEnumerable<ProtoReportItem>