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 should be a list of path entries https://spec.graphql.org/October2021/#sec-Handling-Field-Errors
        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