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

[GraphQL] Ezdate field cannot be queried

    XMLWordPrintable

    Details

      Description

      It's not possible to get a value from ezdate fieldtype when using GraphQL.

      Steps to reproduce:
      1. Login as admin
      2. Create a new Content Type named "MyDate"
      3. Add ezdate fieldtype
      4. Create a Content Item using that Content Type
      5. Regenerate GraphQL schema and clear cache
      6. Enter following query:

      {
        content {
          myDate(locationId: CONTENT_LOCATION_ID)
          {
            newEzdate1 {
              timestamp
              format(pattern: "d")
            }
          }
        }
      }
      

      result:
      timestamp field causes an error:

            "debugMessage": "Call to undefined method eZ\\Publish\\Core\\FieldType\\Date\\Value::getTimestamp()",
            "message": "Internal server Error",
      (...)
      

      format return null - the same query for ezdateandtime fieldtype returns correct values, so something must be wrong with the format option as well (it should return the specified day.

        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: