GraphQLError
Class: GraphQLError
Section titled “Class: GraphQLError”Defined in: packages/fetch-kit/src/errors.ts:97
Thrown when a GraphQL operation returns one or more errors.
GraphQL servers respond with HTTP 200 even when an operation fails, so the
client inspects the response body for an errors array and surfaces it as
this error. Both the error list and any partial data returned by the
server are preserved so callers can decide whether to recover.
Each entry in errors follows the GraphQL spec error shape:
{ message, locations?, path?, extensions? }.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GraphQLError(
errors,data):GraphQLError
Defined in: packages/fetch-kit/src/errors.ts:100
Parameters
Section titled “Parameters”errors
Section titled “errors”readonly object[]
unknown
Returns
Section titled “Returns”GraphQLError
Overrides
Section titled “Overrides”Properties
Section titled “Properties”
readonlydata:unknown
Defined in: packages/fetch-kit/src/errors.ts:107
errors
Section titled “errors”
readonlyerrors: readonlyobject[]
Defined in: packages/fetch-kit/src/errors.ts:101
readonlyname:"GraphQLError"="GraphQLError"
Defined in: packages/fetch-kit/src/errors.ts:98