Contains an error message, the location of the code that caused the error, and other information to help you correct the error.

interface GraphQLError {
    extensions: GraphQLErrorObject;
    locations: GraphQLErrorLocation[];
    message: string;
    path?: any[];
}

Properties

extensions: GraphQLErrorObject

Dictionary with additional information where applicable.

Location within your query where the error occurred.

message: string

Detailed description of the error explaining the root cause of the problem and suggesting how to correct the error.

path?: any[]

Query fields listed in order from the root of the query response up to the field in which the error occurred. path is displayed in the response only if an error is associated with a particular field in the query result.