Class ResponseImpl

java.lang.Object
io.smallrye.graphql.client.impl.ResponseImpl
All Implemented Interfaces:
Response

public class ResponseImpl extends Object implements Response
  • Field Details

  • Constructor Details

  • Method Details

    • getObject

      public <T> T getObject(Class<T> dataType, String rootField)
      Specified by:
      getObject in interface Response
    • getList

      public <T> List<T> getList(Class<T> dataType, String rootField)
      Specified by:
      getList in interface Response
    • getData

      public jakarta.json.JsonObject getData()
      Specified by:
      getData in interface Response
    • getErrors

      public List<GraphQLError> getErrors()
      Specified by:
      getErrors in interface Response
    • getExtensions

      public jakarta.json.JsonObject getExtensions()
      Specified by:
      getExtensions in interface Response
    • 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()
      Specified by:
      hasData in interface Response
    • hasError

      public boolean hasError()
      Specified by:
      hasError in interface Response
    • hasExtensions

      public boolean hasExtensions()
      Specified by:
      hasExtensions in interface Response
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getHeaders

      public Map<String,List<String>> getHeaders()
    • getTransportMeta

      public Map<String,List<String>> getTransportMeta()
      Specified by:
      getTransportMeta in interface Response
    • getStatusCode

      public Integer 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

      public String 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.