Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30265

GraphQL generates invalid schema for Folder Content Type

    XMLWordPrintable

    Details

      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)"} []
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marek.nocon@ez.no Marek NocoĊ„
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: