Skip to content

Commit

Permalink
feat: csfeature title
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoturopoli committed Nov 13, 2024
1 parent 5195a8c commit ca5c32c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/GraphQL/ClassificationstoreFeatureType/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ public static function getCommonFields()
}
},
],
'title' => [
'type' => Type::string(),
'resolve' => static function ($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null) {
if ($value instanceof FeatureDescriptor) {
$keyConfig = KeyConfig::getById($value->getId());
if ($keyConfig) {
return $keyConfig->getTitle();
}
}

return null;
},
],
'description' => [
'type' => Type::string(),
'resolve' => static function ($value = null, $args = [], $context = [], ResolveInfo $resolveInfo = null) {
Expand Down
3 changes: 3 additions & 0 deletions src/GraphQL/TypeInterface/CsFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public static function getInstance()
'name' => [
'type' => Type::string(),
],
'title' => [
'type' => Type::string(),
],
'type' => [
'type' => Type::string(),
],
Expand Down

0 comments on commit ca5c32c

Please sign in to comment.