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

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-rc2
    • Fix Version/s: 2.5.0
    • Component/s: Platform > GraphQL
    • Labels:

      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

            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: