GraphqlError
Stay organized with collections
Save and categorize content based on your preferences.
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.
Fields |
message |
string
The detailed error message. The message should help developer understand the underlying problem without leaking internal data.
|
locations[] |
object (SourceLocation )
The source locations where the error occurred. Locations should help developers and toolings identify the source of error quickly. Included in admin endpoints (ExecuteGraphql , ExecuteGraphqlRead , UpdateSchema and UpdateConnector ) to reference the provided GraphQL GQL document. Omitted in ExecuteMutation and ExecuteQuery since the caller shouldn't have access access the underlying GQL source.
|
path |
array (ListValue format)
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 |
object (GraphqlErrorExtensions )
Additional error information.
|
SourceLocation
SourceLocation references a location in a GraphQL source.
JSON representation |
{
"line": integer,
"column": integer
} |
Fields |
line |
integer
Line number starting at 1.
|
column |
integer
Column number starting at 1.
|
GraphqlErrorExtensions
GraphqlErrorExtensions contains additional information of GraphqlError
.
JSON representation |
{
"file": string
} |
Fields |
file |
string
The source file name where the error occurred. Included only for UpdateSchema and UpdateConnector , it corresponds to File.path of the provided Source .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-20 UTC.
[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# GraphqlError conforms to the GraphQL error spec. \u003chttps://spec.graphql.org/draft/#sec-Errors\u003e\n\nFirebase 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.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"message\": string, \"locations\": [ { object (/docs/reference/data-connect/rest/v1beta/GraphqlError#SourceLocation) } ], \"path\": array, \"extensions\": { object (/docs/reference/data-connect/rest/v1beta/GraphqlError#GraphqlErrorExtensions) } } ``` |\n\n| Fields ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `message` | `string` The detailed error message. The message should help developer understand the underlying problem without leaking internal data. |\n| `locations[]` | `object (`[SourceLocation](/docs/reference/data-connect/rest/v1beta/GraphqlError#SourceLocation)`)` The source locations where the error occurred. Locations should help developers and toolings identify the source of error quickly. Included in admin endpoints (`ExecuteGraphql`, `ExecuteGraphqlRead`, `UpdateSchema` and `UpdateConnector`) to reference the provided GraphQL GQL document. Omitted in `ExecuteMutation` and `ExecuteQuery` since the caller shouldn't have access access the underlying GQL source. |\n| `path` | `array (`[ListValue](https://protobuf.dev/reference/protobuf/google.protobuf/#list-value)` format)` 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. |\n| `extensions` | `object (`[GraphqlErrorExtensions](/docs/reference/data-connect/rest/v1beta/GraphqlError#GraphqlErrorExtensions)`)` Additional error information. |\n\nSourceLocation\n--------------\n\nSourceLocation references a location in a GraphQL source.\n\n| JSON representation |\n|------------------------------------------------|\n| ``` { \"line\": integer, \"column\": integer } ``` |\n\n| Fields ||\n|----------|----------------------------------------|\n| `line` | `integer` Line number starting at 1. |\n| `column` | `integer` Column number starting at 1. |\n\nGraphqlErrorExtensions\n----------------------\n\nGraphqlErrorExtensions contains additional information of `GraphqlError`.\n\n| JSON representation |\n|----------------------------|\n| ``` { \"file\": string } ``` |\n\n| Fields ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `file` | `string` The source file name where the error occurred. Included only for `UpdateSchema` and `UpdateConnector`, it corresponds to `File.path` of the provided `Source`. |"]]