Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useErrorHandler does not handle errors from incremental results #2112

Open
4 tasks done
andrew0 opened this issue Dec 9, 2023 · 0 comments · May be fixed by #2113
Open
4 tasks done

useErrorHandler does not handle errors from incremental results #2112

andrew0 opened this issue Dec 9, 2023 · 0 comments · May be fixed by #2113
Labels
kind/enhancement New feature or request stage/4-pull-request A pull request has been opened that aims to solve the issue

Comments

@andrew0
Copy link

andrew0 commented Dec 9, 2023

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a
    minimal reproduction available on
    Stackblitz.
    • Please install the latest @envelop/* packages that you are using.
    • Please make sure the reproduction is as small as possible.
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

The useErrorHandler plugin does not check for incremental responses in the execution phase, so any errors that happen in incremental payloads are missed.

To Reproduce Steps to reproduce the behavior:

  • Add @defer directive to schema
  • Add useErrorHandler plugin that logs execution phase errors
  • Query a field that throws an error with the @defer directive
  • Error handler is never called

Stackblitz repro: https://stackblitz.com/edit/node-eeltu1?file=start.js

If you run npm run start, no errors will be logged. If the @defer directive is removed from the query, then it is logged.

Environment:

  • OS: Mac
  • NodeJS: 20.7.0
  • @envelop/* versions:
    • @envelop/core: 5.0.0
andrew0 added a commit to andrew0/envelop that referenced this issue Dec 9, 2023
@andrew0 andrew0 linked a pull request Dec 9, 2023 that will close this issue
12 tasks
andrew0 added a commit to andrew0/envelop that referenced this issue Dec 9, 2023
@EmrysMyrddin EmrysMyrddin added kind/enhancement New feature or request stage/4-pull-request A pull request has been opened that aims to solve the issue labels Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request stage/4-pull-request A pull request has been opened that aims to solve the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants