apollo-client: Some GraphQL servers return an empty error array, even though it's not spec compliant
Our 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);
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 4
- Comments: 23 (14 by maintainers)
Commits related to this issue
- Fix #156 by accepting non-spec-compliant empty error array — committed to apollographql/apollo-client by deleted user 8 years ago
- Merge pull request #173 from apollostack/empty-error-array Fix #156 by accepting non-spec-compliant empty error array — committed to apollographql/apollo-client by deleted user 8 years ago
- Fix #156 — committed to apollographql/apollo-client by deleted user 8 years ago
- Merge pull request #156 from callmephilip/patch-1 add a note regarding reducer for custom redux actions — committed to apollographql/apollo-client by helfer 7 years ago
@WilliamHolmes I think you should file an issue on graphql-java. The GraphQL spec says:
@stubailo It’s graphql-java
I’ll take a look soon, thanks for reporting!