DEV Community

Discussion on: I need to serve files from grapghql, is it possible?

Collapse
 
dorshinar profile image
Dor Shinar

Generally, GraphQL endpoints don't deal with binary data. As a matter of fact I've been in charge in my team on providing upload and download of files from our GraphQL endpoint. In the end, I've settled on a /download express endpoint. If you insist on using the GraphQL layer, you can encoder the files in base64 and send the encoded strings.

Collapse
 
dechamp profile image
DeChamp

We are also going to just go with our original plan and add a new restful service which shares the auth service. Base64 would have been fine had we not needed to deal with large files.