Class GHGraphQLResponse<T>

java.lang.Object
org.kohsuke.github.internal.graphql.response.GHGraphQLResponse<T>
Type Parameters:
T - the type of data
Direct Known Subclasses:
GHGraphQLResponse.ObjectResponse

public class GHGraphQLResponse<T> extends Object
A response of GraphQL.

This class is used to parse the response of GraphQL.

  • Constructor Details

    • GHGraphQLResponse

      public GHGraphQLResponse(T data, List<org.kohsuke.github.internal.graphql.response.GHGraphQLResponse.GraphQLError> errors)
      GHGraphQLResponse constructor
      Parameters:
      data - GraphQL success response
      errors - GraphQL failure response, This will be empty if not fail
  • Method Details

    • isSuccessful

      public boolean isSuccessful()
      Is response succesful.
      Returns:
      request is succeeded. True when error list is empty.
    • getData

      public T getData()
      Get response data.
      Returns:
      GraphQL success response
    • getErrorMessages

      public List<String> getErrorMessages()
      Get response error message.
      Returns:
      GraphQL error messages from Github Response. Empty list when no errors occurred.