Some GraphQL servers return an empty error array, even though it's not spec compliant
See original GitHub issueOur GraphQL schema QueryRoot contains a type Viewer which we use to query most of the data.
Apollo doesn’t seem to like this causing the error
Can't find field viewer on object [object Object]
I have validated (and verified the response) with this simple query using GraphiQL
Query
{ viewer { me { displayName } } }
Response
{ "data": { "viewer": { "me": { "displayName": "William Holmes" } } }, "errors": [] }
REF: apollostack/apollo-client/src/networkInterface.ts#L91
I’m using React Integration with mapQueriesToProps and connect
export default connect({ mapQueriesToProps })(MyComponent);
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:23 (14 by maintainers)
Top Results From Across the Web
Some GraphQL servers return an empty error array ... - GitHub
While this behavior is technically spec compliant: The errors entry in the response is a non‐empty list of errors, where each error is...
Read more >Error handling - Apollo GraphQL Docs
This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e., operationName ), or if the named operation...
Read more >GraphQL for mergeRequests returns empty array - GitLab.org
Query mergeRequests(first: "1") via GraphQL returns empty array, even though there are merge requests. Steps to reproduce. Use GraphiQL and run ...
Read more >GraphQL specification
Given a query, tools can ensure that the query is both syntactically correct and valid within the GraphQL type system before execution, i.e....
Read more >GraphQL: Non-nullable array/list - Stack Overflow
If you need to verify whether an array is empty, you have to do so within your resolver logic. If you want GraphQL...
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
@WilliamHolmes I think you should file an issue on graphql-java. The GraphQL spec says:
@stubailo It’s graphql-java