NAME

GraphQL::Houtou::Error - lightweight GraphQL error object

SYNOPSIS

use GraphQL::Houtou::Error;
die GraphQL::Houtou::Error->new(message => 'Something is not right...');

DESCRIPTION

Minimal error object used by GraphQL::Houtou for parse-time and completion-time failures. Stringifies to its message so it can be matched with plain regexes when caught as an exception.

ATTRIBUTES

message (required), locations, path, nodes, extensions, original_error.

METHODS

to_string

Returns the message. Also used for "" overload.

to_json

Returns a hashref with the response-facing keys (message, locations, path, extensions) that are present on the object.