GraphqlError conforms to the GraphQL error spec. https://spec.graphql.org/draft/#sec-Errors
Firebase Data Connect API surfaces GraphqlError
in various APIs: - Upon compile error, UpdateSchema
and UpdateConnector
return Code.Invalid_Argument with a list of GraphqlError
in error details. - Upon query compile error, ExecuteGraphql
and ExecuteGraphqlRead
return Code.OK with a list of GraphqlError
in response body. - Upon query execution error, ExecuteGraphql
, ExecuteGraphqlRead
, ExecuteMutation
and ExecuteQuery
all return Code.OK with a list of GraphqlError
in response body.
JSON representation |
---|
{ "message": string, "locations": [ { object ( |
Fields | |
---|---|
message |
The detailed error message. The message should help developer understand the underlying problem without leaking internal data. |
locations[] |
The source locations where the error occurred. Locations should help developers and toolings identify the source of error quickly. Included in admin endpoints ( Omitted in |
path |
The result field which could not be populated due to error. Clients can use path to identify whether a null result is intentional or caused by a runtime error. It should be a list of string or index from the root of GraphQL query document. |
extensions |
Additional error information. |
SourceLocation
SourceLocation references a location in a GraphQL source.
JSON representation |
---|
{ "line": integer, "column": integer } |
Fields | |
---|---|
line |
Line number starting at 1. |
column |
Column number starting at 1. |
GraphqlErrorExtensions
GraphqlErrorExtensions contains additional information of GraphqlError
.
JSON representation |
---|
{ "file": string } |
Fields | |
---|---|
file |
The source file name where the error occurred. Included only for |