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

GraphQL mutation for file upload does not work

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Customer request, 4.4.1, 4.3.4
    • 4.2.x-dev, 4.3.x-dev
    • None
    • 4.2.4-dev, 4.3.1-dev

    Description

      GraphQL mutation for file upload does not work.

      Steps:

      1. Execute request (link to doc)
        mutation CreateImage($file: FileUpload!) {
          createImage(
            parentLocationId: 51,
            language: eng_GB,
            input: {
              name: "An image created over GraphQL",
              image: {
                alternativeText: "The alternative text",
                file: $file
              }
            }
          ) {
            _contentInfo { id mainLocationId }
            name
            image { fileName alternativeText uri }
          }
        }
        

      Actual result: Image content item is created but error response is returned:

      {
        "errors": [
          {
            "debugMessage": "Call to undefined method Ibexa\\Core\\Repository\\Values\\Content\\Content::getContentInfo()",
            "message": "Internal server Error",
            "extensions": {
              "category": "internal"
            },
            "locations": [
              {
                "line": 17,
                "column": 5
              }
            ],
            "path": [
              "createImage",
              "_contentInfo"
            ],
            "trace": [
              { ...
      

      Expected result: Image is created and file is uploaded without errors.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              michal.szoltysek@ibexa.co Michał Szołtysek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: