diff --git a/src/GraphQL/DocumentType/DocumentFolderType.php b/src/GraphQL/DocumentType/DocumentFolderType.php index 8e76e2ba1..bac92973f 100644 --- a/src/GraphQL/DocumentType/DocumentFolderType.php +++ b/src/GraphQL/DocumentType/DocumentFolderType.php @@ -35,6 +35,7 @@ public function __construct(Service $graphQlService, $config = [], $context = [] */ public function build(&$config) { + $propertyType = $this->getGraphQlService()->buildGeneralType('element_property'); $resolver = new \Pimcore\Bundle\DataHubBundle\GraphQL\Resolver\Element('document', $this->getGraphQLService()); $documentResolver = new \Pimcore\Bundle\DataHubBundle\GraphQL\Resolver\Document(new \Pimcore\Model\Document\Service(), $this->getGraphQlService()); $documentTree = $this->getGraphQlService()->buildGeneralType('document_tree'); @@ -52,6 +53,17 @@ public function build(&$config) ], 'creationDate' => Type::int(), 'modificationDate' => Type::int(), + 'type' => Type::string(), + 'properties' => [ + 'type' => Type::listOf($propertyType), + 'args' => [ + 'keys' => [ + 'type' => Type::listOf(Type::string()), + 'description' => 'comma seperated list of key names', + ], + ], + 'resolve' => [$resolver, 'resolveProperties'], + ], 'parent' => [ 'type' => $documentTree, 'resolve' => [$resolver, 'resolveParent'],