Sandbox explorer file upload

I have a simple mutation to upload a file however I am not sure if I am using the explorer correctly in trying to run my mutation. I click on add files and select a file but it doesn’t seem like the file is being attached to my variables. This is what my explorer looks like. Can you point me to the documentation around adding files to request variables? Thank you
“message”: “Variable "$file" got invalid value "SampleTradeFile.csv"; Upload value invalid.”,

Hello! To quickly fix this, you should be able to jut pass "file": null in your variables section & make sure that your key for the attached file matches your variable. In this case you have test where should be file.

We could do a better job of communicating this, but let me know if that works for you.

1 Like

perfect. That worked
Thank you for the help.
Yea I feel like a bit of documentation around this would be helpful since it is not very intuitive.

I have the same problem, the difference is that I need references to the variable of the file to upload with a variable within an input type, that is, it does not receive the file directly as an argument but within the attributes of an input, when I try to do Apollo studio keeps loading and unfortunately the documentation is insufficient. Does anyone know a solution?

1 Like

did you find any solution?

Worked fine for me… Thank you!


Not sure if you found a solution but in case if your input is an object then set the value under the “Variables” tab like so -

input: {
  file: null

Then, under key, you can set it like -


I hope it helps.