Craft 5 - Location query removes nested entry results #405
Open
Description
Description
Thanks for your support in updating the location searching so far. On upgrading to the latest release 5.0.2 and testing it against our implementation I discovered that, although location searching now works at the top level, it prevents nested entry results from being returned within the context of GraphQL. This includes both related assets and entries. As our Craft is headless I don't know if this also effects front end templating.
Steps to reproduce
- Ensure you have an entry type that has a related or asset based field, and a location
- Make a GraphQL query in the Craft explorer that fetchs the entry without any location filtering and returns properties of the related asset or entry. Retrieve the results, the related asset/entry data will be displayed.
- Build a second GraphQL query in the Craft explorer with the same structure, but that uses location filter with lat lng and order by distance.
- Fetch the results. In the second request the nested data is missing and only an empty array is returned (see attached screenshots for examples). The only difference between the two requests is the addition of the location filter. Although the example shows results for a related asset, I have also tested for related Entries and the same issue occurs.
Additional info
- Craft version: 5.4.2
- Maps version: 5.0.2
- PHP version: 8.2.3
- Database driver & version: Postgres 14
- Other Plugins: CKEditor, Super Table
Metadata
Assignees
Labels
No labels