graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

Fusion does not forward file uploads when they are contained in a list

Open Enterprize1 opened this issue 1 year ago • 0 comments

Product

Hot Chocolate

Version

14.0.0-p.98

Link to minimal reproduction

  • (Testcase in pull request)

Steps to reproduce

In a Fusion Context: Define a list-based input for a mutation in a subgraph where the elements of the list contain an IFile.

(Or copy the new testcase to master)

What is expected?

All file uploads are forwarded to the subgraph.

What is actually happening?

File uploads are missing in the request to the subgraph, so there are complaints about missing input values for the IFiles.

Relevant log output

{
  "errors": [
    {
      "message": "Cannot return null for non-nullable field.",
      "locations": [
        {
          "line": 2,
          "column": 5
        }
      ],
      "path": [
        "uploadMultipleProductPictures"
      ],
      "extensions": {
        "code": "HC0018"
      }
    },
    {
      "message": "Cannot accept null for non-nullable input.",
      "path": [
        "input",
        "products",
        0,
        "file"
      ],
      "extensions": {
        "code": "HC0018",
        "field": "ProductIdWithUploadInput.file"
      }
    }
  ],
  "data": null
}

Additional context

No response

Enterprize1 avatar May 07 '24 10:05 Enterprize1