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

GraphQL returns null or "string" field values

Details

    Description

      Following Query:

       

      {
        content {
          article(id: SELECT-CONTENT-ID) {
            _name
            title
            intro{html5}    }
        }
      }
      

       returns:

      "data": {
          "content": {
            "article": {
              "_name": "Visit Berlin",
              "title": "String",
              "intro": {
                "html5": null
              }
            }
          }
        }
      

      below the generated schema for ArticleContent:

      ArticleContent:
          type: object
          inherits:
              - AbstractDomainContent
          config:
              interfaces:
                  - DomainContent
                  - Node
              fields:
                  title:
                      type: String
                      resolve: String
                  intro:
                      type: RichTextFieldValue
                      resolve: RichTextFieldValue
      

      In previous version it looks different:

              fields:
                  title:
                      type: String
                      resolve: '@=resolver("DomainFieldValue", [value, "title"])'
                  intro:
                      type: RichTextFieldValue
                      resolve: '@=resolver("DomainFieldValue", [value, "intro"])'
      

      Possible regression from following PR:  https://github.com/ezsystems/ezplatform-graphql/pull/77

      Affects Version/s: 3.0.0.-beta5

      Attachments

        Activity

          People

            Unassigned Unassigned
            ramzi.arfaoui-obsolete@ez.no Ramzi Arfaoui (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: