graphqlgraphql-javagraphql-kotlin

How to upload with ExpediaGroup's graphql-kotlin?


There's nothing related to file upload in the examples under https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/server/spring-server/src/main/kotlin/com/expediagroup/graphql/examples/server/spring.

I'd like to upload 5 files at once and although I think it should be a mutation I'm not sure whether it should go like this:

class UploadMutation: Mutation {
    fun upload(files: FilePart) {
        print("$files")
    }
}

The context is obviously Spring Boot with Kotlin and WebFlux.


Solution

  • According to the developers they don't support Apollo-like file uploads at all.