gql added id and revision_id to entite parga in concernement
This commit is contained in:
parent
de193b08b6
commit
559e93a6e5
@ -38,6 +38,8 @@ type Entiteintegre {
|
||||
actuelfuture: Int
|
||||
menacemaintien: Float
|
||||
prise: Float
|
||||
id: Int
|
||||
revision_id: Int
|
||||
}
|
||||
|
||||
type Entite implements NodeInterface {
|
||||
|
@ -347,6 +347,20 @@ class OuattSchemaExtension extends SdlSchemaExtensionPluginBase {
|
||||
})
|
||||
));
|
||||
|
||||
$registry->addFieldResolver('Entiteintegre', 'id',
|
||||
$builder->produce('entity_id')
|
||||
->map('entity', $builder->fromParent())
|
||||
);
|
||||
|
||||
$registry->addFieldResolver('Entiteintegre', 'revision_id',
|
||||
$builder->compose(
|
||||
$builder->callback(function($parent, $arg){
|
||||
$revid = $parent->getRevisionId();
|
||||
return $revid;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
$registry->addFieldResolver('Entiteintegre', 'actuelfuture',
|
||||
$builder->produce('property_path')
|
||||
->map('type', $builder->fromValue('entity:paragraph'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user