Skip to main content

Posts

Showing posts from October, 2023

Sitecore XM with CD bug - _hasLayout property not working in GraphQL

Hi Team, Recently I was working on a search solution, it was simple filtration functionality and we wanted to have simple GraphQL queries so we can get items as we need. The setup up is Sitecore XM scaled with CM and CDs (No experience edge) So, I just wrote simple GQL and were trying to test its results, Query worked just fine, and we were satisfied but we also wanted to have a filter for only items which had some presentation details, because we only wanted to return search results which are created from certain templates and having a presentation set on them, So the search list page will link those pages to those items. So, I just put a standard check of _hasLayout property, using which we could target only those items which have presentation details on them, like following. By just introducing the _hasLayout property It stopped working, though this particular project was not on XM Cloud, we tried testing it on XM Cloud environment as it is a generic search GQL, and we found out th