Upload

interface Upload

A class that represents a file upload in a multipart upload See https://github.com/jaydenseric/graphql-multipart-request-spec

Use this to map your upload custom scalar and the apollo runtime will be able to extract them and send them out of band.

In your build.gradle file:

mapScalarToUpload(Upload)

If you have a JVM File at hand, see also com.apollographql.apollo3.api.DefaultUpload.Builder.content

Functions

Link copied to clipboard
abstract fun writeTo(sink: BufferedSink)

Writes the content of this request to sink.

Properties

Link copied to clipboard
abstract val contentLength: Long

Returns the number of bytes that will be written to sink in a call to .writeTo, or -1 if that count is unknown.

Link copied to clipboard
abstract val contentType: String
Link copied to clipboard
abstract val fileName: String?

The fileName to send to the server. Might be null

Inheritors

Link copied to clipboard