errorPolicy not working
See original GitHub issueWhen setting errorPolicy to all
. Neither errors nor data.X is in the response. Setting it to ignore
, i get the partial data but no error, using the default configuration i get data.error
but not query data.
Intended outcome:
errorPolicy should behave as documented: Add a errors
field next to data in case of an error
Actual outcome: There is neither errors nor response data
How to reproduce the issue: Create a graphql object like this:
const withDataAndErrors = graphql(QUERY_THAT_HAS_DATA_AND_ERRORS, {
options: {
errorPolicy: 'all'
}
});
that query should return something like:
{
"data": {...},
"errors": [...]
}
Version
- apollo-client@2.1.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:19 (6 by maintainers)
Top Results From Across the Web
Error Policy in Apollo Client React seems doesn't work - Help
1 I have a problem when test Apollo. When I try to query with apollo and graphql, i want response return error and...
Read more >errorPolicy not working · Issue #1389 · apollographql/react ...
I'm a volunteer as are others, so we have to fix our own problems. I'm just now getting involved and trying to help...
Read more >error Policy in Apollo Client React does'nt work - Stack Overflow
I faced the same issue with errorPolicy: 'all' , I only received the partial result inside onCompleted callback of useQuery , but no...
Read more >Error Handling – Angular - GraphQL Code Generator
Much like fetchPolicy , errorPolicy allows you to control how GraphQL Errors from the server are sent to your UI code. By default,...
Read more >Output error policies in Azure Stream Analytics | Microsoft Learn
Output data error handling policies apply only to data conversion errors that occur when the output event produced by a Stream Analytics job ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed on master and will be released this week 🌮
sorry about the delay here!
@Matt-Dionis could you test my proposed solution and give some feedback if it is working as it should? Then I’ll make a pull request.