question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow combineResolvers and pipeResolvers to reject

See original GitHub issue

First 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:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
lucasconstantinocommented, Dec 21, 2018

Sorry, sir. Done 😉

1reaction
lucasconstantinocommented, Mar 20, 2018

Sorry, @brandondoran. It is under a beta flag: yarn add graphql-resolvers@beta

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found