Is there a way to add error policy on a query? #2155
-
In a project I am working on we have been migrating from apollo to urql. We also use contentful, which though is not so relevant. In using their gql schema we figured that sometimes we might have an error looking like this I know in apollo you have the I observed you also saying here that returning both errors and the data is possible but I am not getting how to do that from reading the docs. Any advice? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hiya,
|
Beta Was this translation helpful? Give feedback.
Hiya,
urql
always returns aCombinedError
anddata
. However, in the case of a schema error your query won't run and nodata
will be returned 😅