Since core uses Collections for managing all of the specific resource classes like Types and Loaders, REM can simply hook into those Collections from RecurringEventsManager::after_registration() to add its resources
example for registering GQL Types:
add registerResources() method to EventEspresso\RecurringEvents\src\domain\RecurringEventsManager
hook into EventEspresso\core\services\graphql\types\TypeCollection to add Recurrence Type
/**
* @since $VID:$
*/
public function registerResources()
{
add_filter(
'FHEE__EventEspresso_core_services_graphql_TypeCollection__loadCollection__collection_FQCNs',
[$this, 'registerTypes']
);
// other filters here for adding other resources
}
/**
* @param array $collection_FQCNs
* @return array
* @since $VID:$
*/
public function registerTypes(array $collection_FQCNs = [])
{
$collection_FQCNs[] = 'EventEspresso\RecurringEvents\src\domain\services\graphql\types\Recurrence';
return $collection_FQCNs;
}
call registerResources() from after_registration()
Since core uses Collections for managing all of the specific resource classes like Types and Loaders, REM can simply hook into those Collections from
RecurringEventsManager::after_registration()
to add its resourcesexample for registering GQL Types:
add
registerResources()
method toEventEspresso\RecurringEvents\src\domain\RecurringEventsManager
hook into
EventEspresso\core\services\graphql\types\TypeCollection
to add Recurrence Typecall
registerResources()
fromafter_registration()
do something similar for:
EventEspresso\RecurringEvents\domain\services\graphql\connection_resolvers\RecurrenceConnectionResolver
EventEspresso\RecurringEvents\domain\services\graphql\connections\DatetimeRecurrencesConnection
EventEspresso\RecurringEvents\domain\services\graphql\data\loaders\RecurrenceLoader
enums? inputs? others?