replaced path+route_load navigation by id nav for articles and thematiques
This commit is contained in:
@@ -99,6 +99,10 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||
|
||||
$registry->addFieldResolver('Query', 'route',
|
||||
$builder->compose(
|
||||
$builder->callBack(function($parent, $args){
|
||||
$t="t";
|
||||
return $parent;
|
||||
}),
|
||||
$builder->produce('route_load')
|
||||
->map('path', $builder->fromArgument('path')),
|
||||
$builder->callBack(function($parent, $args){
|
||||
@@ -548,12 +552,12 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||
// |_|
|
||||
protected function addThematique(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
|
||||
|
||||
$registry->addFieldResolver('Query', 'Thematique',
|
||||
$registry->addFieldResolver('Query', 'thematique',
|
||||
$builder->produce('entity_load')
|
||||
->map('type', $builder->fromValue('node'))
|
||||
->map('bundles', $builder->fromValue(['thematique']))
|
||||
// ->map('bundles', $builder->fromValue(['thematique']))
|
||||
->map('id', $builder->fromArgument('id'))
|
||||
);
|
||||
);
|
||||
|
||||
$registry->addFieldResolver('Thematique', 'id',
|
||||
$builder->produce('entity_id')
|
||||
|
Reference in New Issue
Block a user