About the multipart: we have this kind of mutation...
# apollo-kotlin
v
About the multipart: we have this kind of mutation
Copy code
mutation uploadFile($id: String!, $files: [Upload!]!)
The request is built like this
Copy code
val upload = DefaultUpload.Builder()
            .content(file)
            .fileName(file.name)
            .build()

        val mutation = UploadFileMutation(id = recommendationId, files = listOf(upload))
But the backend tells me, that the received
files
field is not an array and returns an error to me. Are there any modifications for the multipart request if there's only 1 item to be sent?
b
no, this should work! I know the restrictions about a Logging Interceptor don't help too much here, so maybe you could try something like Charles Proxy to inspect what is sent
👍 1