We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What is the problem?
Originally asked: https://discord.com/channels/802917734999523368/814627766694838293/814822759519354892
When doing invoke(someQuery, {}), the type returned should be whatever someQuery returns. It seems to be Promise<any>.
invoke(someQuery, {})
someQuery
Promise<any>
What are detailed steps to reproduce this?
Repo with example: https://github.com/Swapnull/invoke-any-error-blitz
Can also be tested by generating crud using blitz generate crud myModel and then trying to use invoke(getMyModel, {}) somewhere in code.
blitz generate crud myModel
invoke(getMyModel, {})
Run blitz -v and paste the output here:
blitz -v
macOS Big Sur | darwin-x64 | Node: v15.5.1 blitz: 0.30.5 (global) blitz: 0.30.5 (local) Package manager: yarn System: OS: macOS 11.2.1 CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 58.35 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 15.5.1 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.3.0 - /usr/local/bin/npm Watchman: Not Found npmPackages: @prisma/client: ~2.17 => 2.17.0 blitz: 0.30.5 => 0.30.5 prisma: ~2.17 => 2.17.0 react: 0.0.0-experimental-3310209d0 => 0.0.0-experimental-3310209d0 react-dom: 0.0.0-experimental-3310209d0 => 0.0.0-experimental-3310209d0 typescript: 4.2.2 => 4.2.2 ```
The text was updated successfully, but these errors were encountered:
Probably we need to use our Await utility type to extract the true return type here
Await
Sorry, something went wrong.
invoke
Skn0tt
Successfully merging a pull request may close this issue.
What is the problem?
Originally asked: https://discord.com/channels/802917734999523368/814627766694838293/814822759519354892
When doing
invoke(someQuery, {})
, the type returned should be whateversomeQuery
returns. It seems to bePromise<any>
.What are detailed steps to reproduce this?
Repo with example: https://github.com/Swapnull/invoke-any-error-blitz
Can also be tested by generating crud using
blitz generate crud myModel
and then trying to useinvoke(getMyModel, {})
somewhere in code.Run
blitz -v
and paste the output here:The text was updated successfully, but these errors were encountered: