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
Prisma Client Extensions: args
is undefined
#16551
Comments
Thanks Ryan for the feedback! We have missed assigning a default empty arg for your inputs. For now passing an empty object to |
Thanks @millsp! I tried passing an empty object but am now getting the following error:
The record on line 37 looks like the one belonging to that customer. Not sure about the unknown arg bit though. Thanks! |
Hey, we'll have a fix for this in the upcoming patch release. As for the last error, I think you did a small mistake in your inputs and it's our fault because it wasn't typesafe, but it will be after the patch release. Basically, when you do |
Freshly released |
awesome!! many thanks |
We're working on a docs fix now. |
Bug description
Hello Prisma!
I've just tried out the new preview feature for Prisma Client Extensions and I'm getting an issue with
args
being undefined. I've been referencing the sample here.For my experimentation, I'm trying to create a Prisma Client instance that scopes down queries to records belonging to a specific user or subset of users.
In this case, I'm hard-coding a
customerId
to work with.I then try to call this client as follows:
This throws with the following:
I've tried using both a specific model (
invoice
) and also$allModels
and I get the same behavior.Thanks!
How to reproduce
clientExtensions
preview feature.$extends
and use thequery
block.where
onargs
args
is undefinedExpected behavior
No response
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: