Details
-
Bug
-
Resolution: Fixed
-
High
-
2.5.0-beta2
Description
Command php bin/console ezplatform:graphql:generate-schema generates invalid schema for build-in Folder Content Type.
Steps to reproduce:
1. Install latest version of ezplatform-ee
2. Generate schema with php bin/console ezplatform:graphql:generate-schema
3. Look at generated file: app/config/graphql/ezplatform/FolderContentType.types.yml
It contains "image" section.
Also, following query is suggested with autocomplete:
{ content { folders(sortBy: [_dateModified, _desc]) { edges { node { name shortName image { text html } } } } } }
which results in a server error:
[2019-03-06 22:33:44] app.CRITICAL: [GraphQL] eZ\Publish\Core\Base\Exceptions\InvalidArgumentException: Argument '$fieldIdentifier' is invalid: 'image' field not present on content #49 'Images'[0] (caught throwable) at /home/vagrant/ee_demo/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php line 116. {"throwable":"[object] (eZ\\Publish\\Core\\Base\\Exceptions\\InvalidArgumentException(code: 0): Argument '$fieldIdentifier' is invalid: 'image' field not present on content #49 'Images' at /home/vagrant/ee_demo/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php:116)"} []