Class ResponseReader

java.lang.Object
io.smallrye.graphql.client.impl.ResponseReader

public class ResponseReader extends Object
  • Constructor Details

    • ResponseReader

      public ResponseReader()
  • Method Details

    • parseGraphQLResponse

      public static jakarta.json.JsonObject parseGraphQLResponse(String input)
      Parse a GraphQL response from the input string. Returns the JSON representation of the response if it is present, `null` if there is none. A GraphQL response is defined as a well-formed JSON document that, on the top level, contains at least one of the keys 'data', 'extensions' and 'errors', but NO OTHER key. (see https://spec.graphql.org/draft/#sec-Response-Format)
    • parseGraphQLResponse

      public static jakarta.json.JsonObject parseGraphQLResponse(String input, Boolean allowUnexpectedResponseFields)
    • readFrom

      public static ResponseImpl readFrom(String input, Map<String,List<String>> headers, Integer statusCode, String statusMessage, Boolean allowUnexpectedResponseFields)
    • readFrom

      public static ResponseImpl readFrom(String input, Map<String,List<String>> headers)
    • readFrom

      public static ResponseImpl readFrom(String input, Map<String,List<String>> headers, Integer statusCode, String statusMessage)
    • readError

      public static GraphQLError readError(jakarta.json.JsonValue errorJson)