-
Notifications
You must be signed in to change notification settings - Fork 266
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
Spread operator does not work with util.appendError #753
Comments
Hi there, this would be the wrong repo for this particular issue. I created an issue there, feel free to track it there: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Spread operator does not work to pass arguments to
util.appendError
. This causes an error when attempting to update the resolver code: "Ln 12, Col 22 code.js(12,22): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. "If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Here is the minimal reproduction using a JavaScript unit resolver with a null data source:
What is the expected behavior?
The
util.appendError
call should be allowed, and the resolver code should be updated without receiving a TypeScript error.Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?
APPSYNC_JS issue. It has never worked as far as I can tell.
A workaround is to define a wrapper function and use that to call
util.AppendError
:The text was updated successfully, but these errors were encountered: