I currently have a grahql API which sends out json as string. I now want to tweak this to be able send a downloadable json file in the API response. My schema currently currently looks like this:
object :export_data do field :resp_data, :json end
My initial idea was to change the
resp_data type of a file data type and then in the resolver function return a file (using File.write/2). Something like this:
object :export_data do field :resp_data, :file end
But I couldn’t find a data type in the absinthe documentation that supports a file. How do I send a downloadable file in a graphql API response?