Property | Type | Description | |
---|---|---|---|
$message | string | A message describing the Error for debugging purposes. | |
$nodes | array | An array of GraphQL AST Nodes corresponding to this error. | |
$path | array | An array describing the JSON-path into the execution response which corresponds to this error. Only included for errors during execution. |
Method | Description | |
---|---|---|
__construct ( string $message, array | null $nodes = null, |
||
createLocatedError ( $error, array | null $nodes = null, array | null $path = null ) : |
Given an arbitrary Error, presumably thrown while attempting to execute a GraphQL operation, produce a new GraphQLError aware of the location in the document responsible for the original Error. | |
formatError ( |
||
getLocations ( ) : |
||
getPositions ( ) : array | ||
getSource ( ) : |
||
jsonSerialize ( ) : mixed | Specify data which should be serialized to JSON | |
toSerializableArray ( ) : array | Returns array representation of error suitable for serialization |
public __construct ( string $message, array | null $nodes = null, |
||
$message | string | |
$nodes | array | null | |
$source | ||
$positions | array | null | |
$path | array | null | |
$previous | Exception |
public static formatError ( |
||
$error | ||
return | array |
public getLocations ( ) : |
||
return |
public jsonSerialize ( ) : mixed | ||
return | mixed | data which can be serialized by json_encode, which is a value of any type other than a resource. |
public toSerializableArray ( ) : array | ||
return | array |
public string $message | ||
return | string |
public array $nodes | ||
return | array |
public array $path | ||
return | array |