public static interface GraphQlTester.Request<T extends GraphQlTester.Request<T>>
Modifier and Type | Method and Description |
---|---|
GraphQlTester.Response |
execute()
Execute the GraphQL request and return a spec for further inspection of
response data and errors.
|
void |
executeAndVerify()
Execute the GraphQL request and verify the response contains no errors.
|
GraphQlTester.Subscription |
executeSubscription()
Execute the GraphQL request as a subscription and return a spec with options to
transform the result stream.
|
T |
extension(String name,
Object value)
Add a value for a protocol extension.
|
T |
operationName(String name)
Set the operation name.
|
T |
variable(String name,
Object value)
Add a variable.
|
T operationName(@Nullable String name)
name
- the operation nameT variable(String name, @Nullable Object value)
name
- the variable namevalue
- the variable value, possibly null
since GraphQL
supports providing null value vs not providing a value at all.T extension(String name, @Nullable Object value)
name
- the protocol extension namevalue
- the extension valueGraphQlTester.Response execute()
AssertionError
- if the request is performed over HTTP and the response
status is not 200 (OK).void executeAndVerify()
GraphQlTester.Subscription executeSubscription()
AssertionError
- if the request is performed over HTTP and the response
status is not 200 (OK).