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
|
actuelfuture: Int
|
||||||
menacemaintien: Float
|
menacemaintien: Float
|
||||||
prise: Float
|
prise: Float
|
||||||
|
id: Int
|
||||||
|
revision_id: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
type Entite implements NodeInterface {
|
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',
|
$registry->addFieldResolver('Entiteintegre', 'actuelfuture',
|
||||||
$builder->produce('property_path')
|
$builder->produce('property_path')
|
||||||
->map('type', $builder->fromValue('entity:paragraph'))
|
->map('type', $builder->fromValue('entity:paragraph'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user