Skip to content

Commit

Permalink
Doc: add a disclaimer discouraging multipart file uploads (#5293)
Browse files Browse the repository at this point in the history
Co-authored-by: Maria Elisabeth Schreiber <[email protected]>
  • Loading branch information
BoD and Meschreiber authored Oct 12, 2023
1 parent bdf78aa commit 6126ad8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/source/advanced/upload.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
title: Uploading files
---

Apollo Kotlin supports file uploads via the [GraphQL multipart request specification](https://github.com/jaydenseric/graphql-multipart-request-spec).
Apollo Kotlin supports file uploads via the [GraphQL multipart request specification](https://github.com/jaydenseric/graphql-multipart-request-spec) with a few caveats:

- Uploading files with GraphQL is most often suitable for proof-of-concept applications. In production, using purpose-built tools for file uploads may be preferable. Refer to this [blog post](https://www.apollographql.com/blog/backend/file-uploads/file-upload-best-practices/) for the advantages and disadvantages of multiple approaches.
- The [Apollo Router](/router/) doesn't support `multipart-form` uploads.

## Uploading files with Apollo Kotlin

First, add the following custom scalar mapping to the Apollo Gradle plugin configuration:

Expand Down

0 comments on commit 6126ad8

Please sign in to comment.