You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a mutation where I upload a file and other parameters too but this file can be omitted or included if need be. I am using graphene-file-upload for this, but when I try to omit the file from the request, I get the error.
In the operations section of my insomnia/postman, I remove the file variable:
from: { "query" : "mutation($file: Upload!, $name: String!){createPerson(file:$file, name: $name){success, errors}}", "variables" : { "file" : null, "name": "Kate", } }
The error: { "errors": [ { "message": "mutate() missing 1 required positional argument: 'file'", "locations": [ { "line": 1, "column": 61 } ], "path": [ "createPerson" ] } ], "data": { "createPerson": null } }
I guess since this file is included in the parameters of the mutate method.
Is there a way I could work around this? Thanks
The text was updated successfully, but these errors were encountered:
I have a mutation where I upload a file and other parameters too but this file can be omitted or included if need be. I am using graphene-file-upload for this, but when I try to omit the file from the request, I get the error.
In the operations section of my insomnia/postman, I remove the file variable:
from:
{ "query" : "mutation($file: Upload!, $name: String!){createPerson(file:$file, name: $name){success, errors}}", "variables" : { "file" : null, "name": "Kate", } }
to:
{ "query" : "mutation( $name: String!){createPerson(name: $name){success, errors}}", "variables" : { "name": "Kate", } }
The error:
{ "errors": [ { "message": "mutate() missing 1 required positional argument: 'file'", "locations": [ { "line": 1, "column": 61 } ], "path": [ "createPerson" ] } ], "data": { "createPerson": null } }
I guess since this file is included in the parameters of the mutate method.
Is there a way I could work around this? Thanks
The text was updated successfully, but these errors were encountered: