DEV Community

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

Collapse
 
elasticrash profile image
Stefanos Kouroupis • Edited

Don't know much about graphQL if you can send the bytes through the socket, then you can reconstruct ithe file in the front end. with something like this:

        const blob = new Blob([data], { type: 'application/pdf'});
        const url = window.URL.createObjectURL(blob);
Collapse
 
dechamp profile image
DeChamp

This was my original thought and hope. We decided not to force gql into something it's not meant to do.