The {} is json data, but you can also use a PHP array. Here’s all I know about it (an excerpt from my upcoming book):
getCollectionGraph(string $className, mixed $graph, [mixed $criteria = null],[mixed $cacheFlag = true]) — Like getCollection(), but $graph specifies related objects to retrieve along with the named object (in JSON or PHP array format) in a single query. Returns an array of objects or an empty array on failure. Logs an error if more than one object is found. Sending an empty array for $criteria will get all objects. Set $cacheFlag to false if you don’t need to cache the results.
Example:
<?php
/* get all active users and their profiles */
$users = $modx->getCollectionGraph('modUser', array('Profile' =>array()), array('active'=> '1'))'
/* JSON form equivalent to above . . .
$users = $modx->getObjectGraph('modUser', '{"Profile":{}}', array('active' => '1'));
*/
/* get all users except JoeBlow . . .
$users = $modx->getCollectionGraph('modUser', array('Profile' =>array()), array('username:!='=> 'JoeBlow'))'
*/
/* display user data with Tpl chunk */
foreach ($users as $user) {
$output[] = $modx->getChunk( 'userTpl', array_merge($user->toArray(), $user->Profile->toArray()));
}
return implode("\n", $output);