View more context



Just note, it'll be a new major number, because there are so many changes, so update your composer.json file where needed to 3.x 🙂


Anyone built a File upload mutation in SS? This looks nice 🙂

Show 1 attachment(s)
Apollo GraphQL  
File Uploads with Apollo Server 2.0

Learn how to upload files with Apollo Server and set it up on the client.

Hide attachment content

Hi @gened I did this a while back. It worked pretty well for us


Hah! I found "ecodev/graphql-upload": "3.0.0", plugin as well, and started down the psr7 adpater for SS route as well.. but gave up and just wrote my own middleware. Very nice


@guywatson ^ but yeah so nice to have and UploadType rather than dealing with base64!


Will be great if SS adopted this in the core

👍 (1)

ah interesting, I've done something like that before - made the request a multipart request with the file, created a 'file' type to hold the data. Went reasonably well. I think silverstripe uses a separate endpoint for file uploads

👍 (1)

Maybe a custom OperationResolver like SilverStripe\GraphQL\Pagination\Connection ?


You can upload files in a graphql mutation by base64 encoding them first

👍 (1)