When trying to retrieve a CMS Page over the cmsPage query the links aren't set.
This occurres because in MageWorx\SeoCrossLinks\Model\Observer\AddCrosslinksToPageObserver on line 117 the request FullActionName is compared to a hardcoded 'cms_page_view'. In GraphQl the FullActionName is '__', since the request route, controller and action name are null. So the comparison fails and the observer returns early without applying the links.
if (!in_array($this->request->getFullActionName(), $this->_getAvailableActions())) {
return true;
}
protected function _getAvailableActions()
{
return array('cms_page_view');
}
Solution: if the area code by Magento\Framework\App\State::getAreaCode() is 'graphql' do not compare the action names.
When trying to retrieve a CMS Page over the cmsPage query the links aren't set.
This occurres because in MageWorx\SeoCrossLinks\Model\Observer\AddCrosslinksToPageObserver on line 117 the request FullActionName is compared to a hardcoded 'cms_page_view'. In GraphQl the FullActionName is '__', since the request route, controller and action name are null. So the comparison fails and the observer returns early without applying the links.
Solution: if the area code by Magento\Framework\App\State::getAreaCode() is 'graphql' do not compare the action names.