Got an issue where I've got a type with two unique...
# orm-help
j
Got an issue where I've got a type with two unique fields. Both of them are present as part of
XWhereUniqueInput
, but when I try to query with the second field (not the ID) it just spits back
Variable \"$_v0_where\" got invalid value {\"y\":\"google\"}; Field \"y\" is not defined by type XWhereUniqueInput.
The generated schema has:
Copy code
input XWhereUniqueInput {
	id: UUID
	y: String
}
d
Are you trying to get one X or many X?
For one X, I think only unique fields should be available.
Please create an issue with all the information here:- https://github.com/prismagraphql/prisma/issues/new?template=bug_report.md
j
Ait, I'll do that. And yes this for single X query, which is why I found it rather weird. When trying the exact same, interacting directly with Prisma instead of through the binding, it works flawlessly.
d
Then it might be a bug in binding, are you using JS or TS?
j
JS.
a
Did you add the Y field later, and did not regenerate the bindings?
👍 1
j
I've regenerated the schema from Prisma. Deployment is up to date. The snippet that I posted above is from the actual generated schema.
a
Can you also share the generated bindings?
j
I'm not sure I follow. The only generated file I use is the generated schema. But I can share the entire file if you want me to.
d
Ah! you are using JS, i.e. there are no generated bindings! Can you reproduce this issue and create an issue on github out of it?
j
I'll do my best to put it up there. Do you want a sample repo for ease?
👍🏻 2
d
That would be awesome!