replaced path+route_load navigation by id nav for articles and thematiques

This commit is contained in:
2021-03-06 16:46:19 +01:00
parent 651315c319
commit 8dadb8d3a5
7 changed files with 62 additions and 68 deletions

View File

@@ -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')