-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Error: Unknown object type "promise" #1221
Comments
Hey @omar-dulaimi 👋, Thank you for opening an issue. We will get back to you as soon as we can. Have you seen our Open Collective page? Please consider contributing financially to our project. This will help us involve more contributors and get to issues like yours faster. https://opencollective.com/graphql-shield
|
We have the same error unfortunately when using graphql upload with the ShieldCache turned on strict, as it goes through all the args. Has there been found any solution yet? |
I hit this same issue, but figured out the fix for it. The issue is caused by object-hash (used in the default hash implementation) not being able to handle promises. Install
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug report
Describe the bug
File uploads don't work and produce the error above.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
I use typegraphql with graphql-upload. Basically, I send an array of files like this in a mutation:
then the error occurs.
Expected behavior
File uploads should succeed as they used to.
Actual behaviour
Error: Unknown object type "promise"
Additional context
Deleting this line
const schemaWithPermissions = applyMiddleware(schema, permissions);
and using
schema
without
applyMiddleware
uploads would work fine. But how should I enable permissions then?
NOTE:
I have commented out any mutations that do file uploads from Shield, until this issue gets fixed.
The text was updated successfully, but these errors were encountered: