-
Notifications
You must be signed in to change notification settings - Fork 684
Closed
Labels
Description
What happened?
Description
The placeOfDeath argument on the entries query does not filter correctly by that specific relational field. Instead, it appears to behave like a generic relatedTo filter, returning entries where the given ID is related to the entry in any relational field — not exclusively placeOfDeath.
Steps to reproduce
- Open the GraphQL API explorer (Full Schema)
- Run the following query:
query {
entries(section: "person", placeOfDeath: [183450]) {
id
title
... on personDefault_Entry {
placeOfBirth {
id
title
}
placeOfDeath {
id
title
}
}
}
}- Observe that the returned entry has
placeOfBirth.id = "183450"butplaceOfDeath.id = "156580"
Expected behavior
Only entries where placeOfDeath contains ID 183450 should be returned. An entry where 183450 appears only in placeOfBirth should not be included in the results.
Actual behavior
The returned entry has ID 183450 in placeOfBirth, not in placeOfDeath:
{
"data": {
"entries": [
{
"id": "157678",
"title": "Chiha, Michel",
"placeOfBirth": [
{ "id": "183450", "title": "Ottoman Syria" }
],
"placeOfDeath": [
{ "id": "156580", "title": "Beirut" }
]
}
]
}
}The filter is matching the ID across all relational fields instead of scoping the lookup to placeOfDeath only.
Craft CMS version
5.9.17
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
Reactions are currently unavailable