Package graphql

Interface GraphQLError

    • Method Detail

      • getMessage

        java.lang.String getMessage()
        Returns:
        a description of the error intended for the developer as a guide to understand and correct the error
      • getLocations

        java.util.List<SourceLocation> getLocations()
        Returns:
        the location(s) within the GraphQL document at which the error occurred. Each SourceLocation describes the beginning of an associated syntax element
      • getPath

        default java.util.List<java.lang.Object> getPath()
        The graphql spec says that the (optional) path field of any error must be a list of path entries starting at the root of the response and ending with the field associated with the error https://spec.graphql.org/draft/#sec-Errors.Error-Result-Format
        Returns:
        the path in list format
      • toSpecification

        default java.util.Map<java.lang.String,​java.lang.Object> toSpecification()
        The graphql specification says that result of a call should be a map that follows certain rules on what items should be present. Certain JSON serializers may or may interpret the error to spec, so this method is provided to produce a map that strictly follows the specification. See : GraphQL Spec - 7.1.2 Errors
        Returns:
        a map of the error that strictly follows the specification
      • getExtensions

        default java.util.Map<java.lang.String,​java.lang.Object> getExtensions()
        Returns:
        a map of error extensions or null if there are none