This is what my schema looks like:
extend type Mutation {
createMutation(
my_id: ID!
my_data: input_data
): some_output
input input_data {
some_key: ID!
file : Upload!
}
This is how I am defining my operations in POSTMAN
{
"query": "mutation CreateMutation($my_id: ID! , $my_data: [input_data]) { createMutation(my_id: $my_id, my_data : $my_data) { some_key}}",
"variables": {
"my_id": "some-string-id",
"my_data": [
{
"some_key": 123,
"file" : null
}
]
}
}
under map I have : { "0" : ["variables.file"] }
The server recieves file = null, what am I doing wrong? How can I replace this
2 Answers
Operations:
{"query": "mutation ($profilePicture:Upload!) {updateProfilePicture(profilePicture: $profilePicture ) { done ,errors { field message } }} ",
"variables": {
"profilePicture": null
}
}
map:
{ "1": ["variables.profilePicture"] }
1:
file.jpg
Hi Sid, How to write graphql query for above postman upload query pls help.