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

[GraphQL] Cannot query image and imageAsset lastModified date of a variation

    XMLWordPrintable

Details

    Description

      It's not possible to get a query for the last modified date of a variation from "image" or "imageAsset" field type.

      Steps to reproduce:
      1. Login as admin
      2. Create a new Content Type named "MyImageAsset"
      3. Add image asset fieldtype
      4. Create a Content Item using that Content Type
      5. Regenerate GraphQL schema and clear cache
      6. Enter query similar to:
      For created imageAsset:

      {
        content {
          myImageAsset(locationId: 57) {
            newEzimageasset1 {
              variation(identifier: small) {
                lastModified
              }
            }
          }
        }
      }
      

      For built-in image Content Type, that has ezimage fieldtype:

      {
        media {
          image(locationId: 58) {
            image {
              variation(identifier: small) {
                lastModified
              }
            }
          }
        }
      }
      

      result:

      {
        "errors": [
          {
            "debugMessage": "Expected a value of type \"String\" but received: instance of DateTime",
            "message": "Internal server Error",
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            marek.nocon@ibexa.co Marek NocoĊ„
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: