Class ResponseReader


  • public class ResponseReader
    extends Object
    • Constructor Detail

      • ResponseReader

        public ResponseReader()
    • Method Detail

      • 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)
      • readError

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