I tried upload a file but it doesn’t work as we do not work on JSON format. We have a custom format for the upload file, is there a way in which we can handle this usecase? When every i pass File object fails with below error
Error :java.lang.IllegalStateException: Cannot write test.sls to Json
at com.apollographql.apollo3.api.json.-JsonWriters.writeAny(JsonWriters.kt:40)
at com.apollographql.apollo3.api.Adapters$AnyAdapter$1.toJson(Adapters.kt:176)
at com.apollographql.apollo3.api.Adapters$AnyAdapter$1.toJson(Adapters.kt:184)
at com.vmware.guardrails.e2e.adapter.CreateTemplateMutation_VariablesAdapter.toJson(CreateTemplateMutation_VariablesAdapter.java:51)
Yeah it was tried but face same issue during gralew build because it trying to convert the multipart file to json again. Do we support any other file formats other than json.
Hmm, I’m not entirely sure of what you mean by JSON in this context.
Could you show what you tried in the gradle plugin configuration, and in your code, as well as the GraphQL mutation and the relevant part of your GraphQL schema?
@Benoit_Lubek We are using customScalarMapping for Date. But now we have a requirement where in we have to start supporting FileUploads.
If I add mapScalarToUpload then my build errors saying that I could either use mapScalarToUpload or customScalarMapping. Any suggestions how to get past this with the least possible code change?