Allow combineResolvers and pipeResolvers to reject
See original GitHub issueFirst off, thanks for this very useful library.
The issue I’m running into is with how combineResolvers
and pipeResolvers
have a .catch
that returns the error, rather than allowing the error to bubble up. This seems to be counter to how a regular resolver would work.
Currently, as I user of the library, If I want to act on an error occurring in the resolver, I have to use instanceof
on the resolved value and if it’s an Error
, act appropriately. If I want to allow graphql to just add the error to the errors
array in the response, then I have to check with instanceof
and if Error
re-throw.
Perhaps I’m using it wrong, but I seems like it should be up to the code using the library to decide how error should be handled.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Pipeline resolvers (VTL) - AWS AppSync
Let's create a function that checks if an email is valid and comes from a specific domain. If the email is not valid,...
Read more >Resolvers - Apollo GraphQL Docs
Let's say our server defines the following (very short) schema: GraphQL. 1. type Query {. 2. numberSix: Int! # Should always return the...
Read more >How am I using apollo combineResolvers() wrong?
When I use combineResolvers(), I get an INTERNAL_SERVER_ERROR, "Error: Cannot return null for non-nullable field User.id.".
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
Sorry, sir. Done 😉
Sorry, @brandondoran. It is under a beta flag:
yarn add graphql-resolvers@beta