Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-4092

Querying reverse relation data in GraphQL throws an exception

    XMLWordPrintable

Details

    • Ibexa Open Source

    Description

      Steps to reproduce:

      1. Create "Article reverse" content of Article Content Type - note its ID.
      2. Create another Article and choose "Article reverse" as a relation in an "Image" field.
      3. Run the following GraphQL query:
        {
          content {
            article (id: 245) {
              id
                _info {
                  id
                reverseRelations {
                  type  
                  sourceFieldDefinitionIdentifier
                   sourceContent {
                     _info {
                      id
                    }
                   }
                }
                }
              }
          }
        }
        

        where 245 is an ID of the Article from step 1.

      Result:
      Exception is thrown:

      Argument 1 passed to EzSystems\\EzPlatformGraphQL\\GraphQL\\Resolver
      DomainContentResolver::resolveDomainContentType() must be an instance of eZ\\Publish\\API\\Repository\\Values\\Content
      Content, instance of eZ\\Publish\\API\\Repository\\Values\\Content
      ContentInfo given

      Expected result:
      ID of Article from step 2. should be fetched properly.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: