Been struggling a few days trying to get this to work. I have a graphQL endpoint which allows users to upload an image to their user profile.
The image is in same directory as feature files and its finding it ok.
Following the documentation, I came up with:
Scenario: Upload an Avatar
Given path 'query'
And header Accept = 'application/json'
And multipart file myFile = { read: 'bud.png', filename: 'bud.png', contentType: 'image/png' }
Given text query =
"""
mutation {
setUserAvatar(userID: "571d7a92", imageFile: "bud.png"){id}
}
"""
And request { query: '#(query)' }
When method POST
Then status 200
And print response
However the server keeps giving me response (200) with "message": "string is not an Upload"
So I am assuming I'm not calling the image properly. Any tips?