Hi,
I've just started playing around with headless feature of Runway.
I have two collection: `authors` and `news` – for which I have configure headless access. News template has a relationship with `authors` collection so that content editor can assign an author for a given news.
I do get the json response, but the author is returned as an array of what seems to be `ids`.
Code: news.php
- $Headless = $API->get('HeadlessAPI');
- $Response = $Headless->new_response();
- $Collections = $API->get('ContentCollections');
- $Collection = $Collections->find('News');
- $Set = $Headless->new_set('news');
- $Set->add_items($Collection->query([
- 'sort' => 'date',
- 'sort-order' => 'DESC',
- ]));
- $Response->add_set($Set);
- $Response->respond();
Any idea on how to get the relationship to be returned as part of news.json?
Thanks,