![]() |
![]()
| ![]() |
![]()
NAMEGraphQL::Error - GraphQL error object SYNOPSISuse GraphQL::Error; die GraphQL::Error->new(message => 'Something is not right...'); DESCRIPTIONClass implementing GraphQL error object. ATTRIBUTESmessageoriginal_errorIf there is an original error to be preserved. locationsArray-ref of "DocumentLocation" in GraphQL::Type::Librarys. pathArray-ref of "StrNameValid" in GraphQL::Type::Librarys or "Int"s describing the path from the top operation (being either fields, or a List offset). extensionsHash-ref of "JSONable" in GraphQL::Type::Librarys providing additional information. METHODSisIs the supplied scalar an error object? coerceIf supplied scalar is an error object, return. If not, return one with it as message. If an object, message will be stringified version of that, it will be preserved as "original_error". butReturns a copy of the error object, but with the given properties (as with a "new" method, not coincidentally) overriding the existing ones. to_stringConverts to string. to_jsonConverts to a JSON-able hash, in the format to send back as a member of the "errors" array in the results.
|