PHP 클래스 GraphQL\Error\Error

상속: extends Exception, implements JsonSerializable
파일 보기 프로젝트 열기: webonyx/graphql-php 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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.

공개 메소드들

메소드 설명
__construct ( string $message, array | null $nodes = null, Source $source = null, array | null $positions = null, array | null $path = null, Exception $previous = null )
createLocatedError ( $error, array | null $nodes = null, array | null $path = null ) : Error 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 ( Error $error ) : array
getLocations ( ) : SourceLocation[]
getPositions ( ) : array
getSource ( ) : Source | null
jsonSerialize ( ) : mixed Specify data which should be serialized to JSON
toSerializableArray ( ) : array Returns array representation of error suitable for serialization

메소드 상세

__construct() 공개 메소드

public __construct ( string $message, array | null $nodes = null, Source $source = null, array | null $positions = null, array | null $path = null, Exception $previous = null )
$message string
$nodes array | null
$source GraphQL\Language\Source
$positions array | null
$path array | null
$previous Exception

createLocatedError() 공개 정적인 메소드

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.
public static createLocatedError ( $error, array | null $nodes = null, array | null $path = null ) : Error
$error
$nodes array | null
$path array | null
리턴 Error

formatError() 공개 정적인 메소드

public static formatError ( Error $error ) : array
$error Error
리턴 array

getLocations() 공개 메소드

public getLocations ( ) : SourceLocation[]
리턴 GraphQL\Language\SourceLocation[]

getPositions() 공개 메소드

public getPositions ( ) : array
리턴 array

getSource() 공개 메소드

public getSource ( ) : Source | null
리턴 GraphQL\Language\Source | null

jsonSerialize() 공개 메소드

Specify data which should be serialized to JSON
public jsonSerialize ( ) : mixed
리턴 mixed data which can be serialized by json_encode, which is a value of any type other than a resource.

toSerializableArray() 공개 메소드

Returns array representation of error suitable for serialization
public toSerializableArray ( ) : array
리턴 array

프로퍼티 상세

$message 공개적으로 프로퍼티

A message describing the Error for debugging purposes.
public string $message
리턴 string

$nodes 공개적으로 프로퍼티

An array of GraphQL AST Nodes corresponding to this error.
public array $nodes
리턴 array

$path 공개적으로 프로퍼티

An array describing the JSON-path into the execution response which corresponds to this error. Only included for errors during execution.
public array $path
리턴 array