Package io.smallrye.graphql.client.impl
Class ResponseImpl
java.lang.Object
io.smallrye.graphql.client.impl.ResponseImpl
- All Implemented Interfaces:
Response
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResponseImpl(jakarta.json.JsonObject data, List<GraphQLError> errors, jakarta.json.JsonObject extensions, Map<String, List<String>> headers) ResponseImpl(jakarta.json.JsonObject data, List<GraphQLError> errors, jakarta.json.JsonObject extensions, Map<String, List<String>> headers, Integer statusCode, String statusMessage) ResponseImpl(jakarta.json.JsonObject data, List<GraphQLError> errors, Map<String, List<String>> headers) ResponseImpl(jakarta.json.JsonObject data, List<GraphQLError> errors, Map<String, List<String>> headers, Integer statusCode, String statusMessage) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.json.JsonObjectgetData()jakarta.json.JsonObject<T> List<T> <T> TReturns the HTTP status code.Returns the HTTP status message.booleanhasData()booleanhasError()booleanvoidIf there are application errors inside this response, this method converts these errors into a `GraphQLClientException` and throws it.toString()
-
Field Details
-
STATUS_CODE
- See Also:
-
STATUS_MESSAGE
- See Also:
-
-
Constructor Details
-
ResponseImpl
-
ResponseImpl
-
ResponseImpl
-
ResponseImpl
-
-
Method Details
-
getObject
-
getList
-
getData
public jakarta.json.JsonObject getData() -
getErrors
-
getExtensions
public jakarta.json.JsonObject getExtensions()- Specified by:
getExtensionsin interfaceResponse
-
throwExceptionIfErrors
public void throwExceptionIfErrors()If there are application errors inside this response, this method converts these errors into a `GraphQLClientException` and throws it. If there are no errors, then this method does nothing. -
hasData
public boolean hasData() -
hasError
public boolean hasError() -
hasExtensions
public boolean hasExtensions()- Specified by:
hasExtensionsin interfaceResponse
-
toString
-
getHeaders
-
getTransportMeta
- Specified by:
getTransportMetain interfaceResponse
-
getStatusCode
Returns the HTTP status code. Returns null if no HTTP status code is known, for example when this response corresponds to an operation executed over a websocket rather than a simple HTTP exchange. -
getStatusMessage
Returns the HTTP status message. Returns null if no HTTP status message is known, for example when this response corresponds to an operation executed over a websocket rather than a simple HTTP exchange.
-