prisma-client-go icon indicating copy to clipboard operation
prisma-client-go copied to clipboard

Unclear how to use signatures

Open matthewmueller opened this issue 5 years ago • 0 comments

Problem

Given the following:

client.User.FindOne(params iUserEqualsParamsUnique)

It's not clear to me what params should be.

I first tried

client.User.FindOne(client.User.Equal(...))

Then I tried

client.User.FindOne(db.User.Equal(...))

Finally I tried

client.User.FindOne(db.User.ID.Equal(...))

Potential Solutions

1. Add documentation to FindOne so hovering over FindOne provides an example

image

2. Change signature to be more like:

client.User.FindOne(params dbUserFieldEqualsUnique)

matthewmueller avatar Jul 15 '20 09:07 matthewmueller