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

debug mode docs don't match types #911

Closed
chrisdrackett opened this issue Nov 8, 2019 · 2 comments
Closed

debug mode docs don't match types #911

chrisdrackett opened this issue Nov 8, 2019 · 2 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Milestone

Comments

@chrisdrackett
Copy link

in the docs here:

https://github.com/prisma/prisma2/blob/master/docs/photon/api.md#debugging

it mentions debug mode can be used with const photon = new Photon({ debug: true }) however this raises an error in practice:

Argument of type '{ debug: boolean; }' is not assignable to parameter of type 'PhotonOptions'.

It seems log is available and __internal: { debug: true } not sure if either or both of these is equivalent.

@pantharshit00
Copy link
Contributor

pantharshit00 commented Nov 11, 2019

Yes, it is indeed a typo. If you will execute it in JS, it logs the debug output.

Thanks for catching this!

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. process/candidate labels Nov 11, 2019
@janpio janpio added this to the Preview 18 milestone Nov 22, 2019
@nikolasburk
Copy link
Member

Hey @chrisdrackett, thanks a lot for opening this issue! I couldn't reproduce the error Argument of type '{ debug: boolean; }' is not assignable to parameter of type 'PhotonOptions'. that you shared, can you confirm that this actually works in the latest release?

I did update the docs though to also document the log option and the different log levels that can be provided: https://github.com/prisma/prisma2/blob/master/docs/photon/api.md#debugging

Let me know if that addresses your issues! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

4 participants