$on
query event subscriptions for extended clients actually get applied to the underlying base client
#18724
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/client
Issue for team Client.
tech/typescript
Issue for tech TypeScript.
topic: extend-client
Extending the Prisma Client
Bug description
with an express app, I want to log every SQL query with its associated request ID (e.g. see #7596). i thought i might be able to pull this off by creating an extended client per request as suggested here, but when i attach a
'query'
event listener to the extended client, it actually gets applied to the base client instead.same thing is described here: #16500 (comment) (the comment right after that one requests that the poster open a new issue for this, but i couldn't find one, so i'm opening this one)
How to reproduce
Expected behavior
there should only be one log line,
query from ext1
Prisma information
issue is independent of any particular prisma schema
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: