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

[GraphQL] Can't get all contents from Multiple relations

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Customer request
    • 4.6.7
    • None
    • None
    • Yes

    Description

      Steps to reproduce

      1. Create a new content type with ezobjectrelationlist field
      2. regenerate graphQL schema
      3. Create around 30 contents (e.g. folders)
      4. Create a content with created content type and select 30 contents
      5. Publish
      6. Try to get content via graphQL
      {
         content {
          contentobj(contentId: 188) {
            ezobj {
              _contentInfo {
                id
              }
            }
          }
        }
      } 

      change 'ezobj' to your field's name and 188 to created content id.

       

      Result

      The response contained only 25 correct ids and the rest was filled with the first id retrieved

       

      Expected

      All content should get correctly at once, otherwise we should be able to use pagination

       

      Note

      In RelationFieldResolver class we have :

      $contentItems = $this->contentLoader->find(new Query(
          [
              'filter' => new Query\Criterion\ContentId($destinationContentIds),
          ]
      )); 

      as we are search content without a given limit and the default limit is 25, which causes a problem

      Designs

        Attachments

          Activity

            People

              mateusz.debinski@ibexa.co Mateusz Dębiński
              mateusz.debinski@ibexa.co Mateusz Dębiński
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: