Class GraphQLResponse
public sealed class GraphQLResponse : IDisposable
- Inheritance
-
GraphQLResponse
- Implements
- Inherited Members
- Extension Methods
Properties
Content
public string Content { get; }
Property Value
Data
public JsonElement? Data { get; }
Property Value
ElapsedTime
public TimeSpan ElapsedTime { get; }
Property Value
Errors
public IReadOnlyList<GraphQLError> Errors { get; }
Property Value
Extensions
public JsonElement? Extensions { get; }
Property Value
HasData
public bool HasData { get; }
Property Value
HasErrors
public bool HasErrors { get; }
Property Value
HttpStatusCode
public HttpStatusCode HttpStatusCode { get; }
Property Value
RawResponse
public HttpResponseMessage RawResponse { get; }
Property Value
SelectedData
The selected root-field value for shape-driven operations; otherwise the complete data object.
public JsonElement? SelectedData { get; }
Property Value
Should
Positive assertions on this response, such as Should.HaveHttpStatus(...).
public GraphQLAssertions Should { get; }
Property Value
ShouldNot
Assertions that must not hold, such as ShouldNot.HaveHttpStatus(...). Error and shape
assertions keep their own positive and negative forms.
public GraphQLAssertions ShouldNot { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
ReadDataAs<T>(JsonSerializerOptions?)
public T? ReadDataAs<T>(JsonSerializerOptions? options = null)
Parameters
optionsJsonSerializerOptions
Returns
- T
Type Parameters
T
ShouldHaveError(string)
public GraphQLResponse ShouldHaveError(string code)
Parameters
codestring
Returns
ShouldHaveErrors()
public GraphQLResponse ShouldHaveErrors()
Returns
ShouldHaveNoErrors()
public GraphQLResponse ShouldHaveNoErrors()
Returns
ShouldMatchShape(object, JsonSerializerOptions?)
public GraphQLResponse ShouldMatchShape(object expectedShape, JsonSerializerOptions? options = null)
Parameters
expectedShapeobjectoptionsJsonSerializerOptions