Describe the bug
Trying to find a Node by reference of other node, like mentioned in the docs (4th example in this section)
QUERY:
query {
campaigns(where: { partner: { imdeId: "loremipsum" } }) {
id
partner {
imdeId
}
}
}
RESULT:
{
"data": null,
"errors": [
{
"message": "Argument 'where' expected type 'CampaignWhereInput' but got: {partner: {imdeId: \"loremfuckingipsum\"}}. Reason: 'partner' Field 'partner' is not defined in the input type 'CampaignWhereInput'. (line 2, column 20):\n campaigns(where: {partner: {imdeId: \"loremfuckingipsum\"}}) {\n ^\n (line 2, column 21):\n campaigns(where: {partner: {imdeId: \"loremfuckingipsum\"}}) {\n ^",
"locations": [
{
"line": 2,
"column": 20
},
{
"line": 2,
"column": 21
}
]
}
]
}
SCHEMA:
type Campaign {
id: ID! @id @unique
...
partner: Partner @relation(name: "CampaignOwner")
}
type Partner {
id: ID! @id @unique
imdeId: String @unique
campaigns:[Campaign] @relation(name: "CampaignOwner", link: INLINE)
}
Versions (please complete the following information):
Ubuntu 18.04prisma CLI: prisma/1.22.2 (linux-x64) node-v10.14.1"prisma-client-lib": "^1.22.2"prisma-binding : 2.2.11Hi @FinnFrotscher,
From the schema that you have shared, I can infer that you are using the mongo connector.
Relational filters for MongoDB are in beta currently, so please use the version 1.24-beta image in your docker-compose file.
solved.
I'm still getting this on 1.26.5 (I can't go to 1.28 because it has an error with MongoDB Atlas). Where can I track when this feature will be added to the production branch? It's included in the docs for 1.26 so I assume it should work.
Most helpful comment
Hi @FinnFrotscher,
From the schema that you have shared, I can infer that you are using the mongo connector.
Relational filters for MongoDB are in beta currently, so please use the version
1.24-betaimage in your docker-compose file.