gql entite field_confidentialite
This commit is contained in:
parent
2e3691a090
commit
387d6e7aac
@ -59,7 +59,7 @@ type Entite implements NodeInterface {
|
||||
sources: [Source]
|
||||
concernement: Concernement
|
||||
image: [Image]
|
||||
|
||||
confidentialite: String
|
||||
}
|
||||
|
||||
type Source {
|
||||
|
@ -569,6 +569,22 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||
)
|
||||
);
|
||||
|
||||
// $registry->addFieldResolver('Entite', 'confidentialite',
|
||||
// $builder->compose(
|
||||
// $builder->callback(function(/** @var Drupal\node\Entity\node */ $parent, $arg){
|
||||
// $user = \Drupal::currentUser();
|
||||
// $can_update = $parent->access('update', $user);
|
||||
// return 'hello';
|
||||
// })
|
||||
// )
|
||||
// );
|
||||
$registry->addFieldResolver('Entite', 'confidentialite',
|
||||
$builder->produce('property_path')
|
||||
->map('type', $builder->fromValue('entity:node'))
|
||||
->map('value', $builder->fromParent())
|
||||
->map('path', $builder->fromValue('field_confidentialite.value'))
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user