Class GraphQLRequestBuilder
public sealed class GraphQLRequestBuilder
- Inheritance
-
GraphQLRequestBuilder
- Inherited Members
- Extension Methods
Methods
Auth(IProtoHttpAuthenticator)
public GraphQLRequestBuilder Auth(IProtoHttpAuthenticator authenticator)
Parameters
authenticatorIProtoHttpAuthenticator
Returns
Auth<TAuthenticator>(params object[])
public GraphQLRequestBuilder Auth<TAuthenticator>(params object[] constructorArgs) where TAuthenticator : class, IProtoHttpAuthenticator
Parameters
constructorArgsobject[]
Returns
Type Parameters
TAuthenticator
ConnectionPayload(object)
Sets the optional graphql-transport-ws connection_init payload.
public GraphQLRequestBuilder ConnectionPayload(object payload)
Parameters
payloadobject
Returns
ExecuteAsync(CancellationToken)
public Task<GraphQLResponse> ExecuteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
ExpectAsync<TShape>(TShape, CancellationToken)
Selects, executes, and matches one root field using the same response shape.
public Task<GraphQLResponse> ExpectAsync<TShape>(TShape expectedShape, CancellationToken cancellationToken = default)
Parameters
expectedShapeTShapecancellationTokenCancellationToken
Returns
Type Parameters
TShape
Header(string, string)
public GraphQLRequestBuilder Header(string name, string value)
Parameters
Returns
Mutation(string?, Action<GraphQLOperationBuilder>)
public GraphQLRequestBuilder Mutation(string? name, Action<GraphQLOperationBuilder> configure)
Parameters
namestringconfigureAction<GraphQLOperationBuilder>
Returns
Mutation(string, object?, string?)
Starts a shape-driven mutation for one root field.
public GraphQLRequestBuilder Mutation(string rootField, object? arguments = null, string? operationName = null)
Parameters
Returns
Query(string?, Action<GraphQLOperationBuilder>)
public GraphQLRequestBuilder Query(string? name, Action<GraphQLOperationBuilder> configure)
Parameters
namestringconfigureAction<GraphQLOperationBuilder>
Returns
Query(string, object?, string?)
Starts a shape-driven query for one root field.
public GraphQLRequestBuilder Query(string rootField, object? arguments = null, string? operationName = null)
Parameters
Returns
Request(string, string?)
public GraphQLRequestBuilder Request(string document, string? operationName = null)
Parameters
Returns
Select<TShape>()
Derives the GraphQL selection set from a test-owned contract type.
public GraphQLRequestBuilder Select<TShape>()
Returns
Type Parameters
TShape
Select<TShape>(TShape)
Derives the GraphQL selection set from an anonymous object or test-owned contract.
public GraphQLRequestBuilder Select<TShape>(TShape selectionShape)
Parameters
selectionShapeTShape
Returns
Type Parameters
TShape
SubscribeAsync(CancellationToken)
public Task<GraphQLSubscription> SubscribeAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
Subscription(string?, Action<GraphQLOperationBuilder>)
public GraphQLRequestBuilder Subscription(string? name, Action<GraphQLOperationBuilder> configure)
Parameters
namestringconfigureAction<GraphQLOperationBuilder>
Returns
Subscription(string, object?, string?)
Starts a shape-driven subscription for one root field.
public GraphQLRequestBuilder Subscription(string rootField, object? arguments = null, string? operationName = null)
Parameters
Returns
Variables(object)
public GraphQLRequestBuilder Variables(object variables)
Parameters
variablesobject
Returns
WithoutAuth()
public GraphQLRequestBuilder WithoutAuth()