Upload Image with Graphql + Adonis


Hello guys.

I didn’t find anything about it on the web.
I would like some examples of who uses these technologies to solve my problem.



Well I guess you’re misunderstanding about graphql

it’s web says

GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn’t tied to any specific database or storage engine and is instead backed by your existing code and data.

So it’s function is helping making queries, not serving in this task you’re writing; you can upload the image using for example:

  • FormData class in JavaScript
  • AJAX to make your uploading form working in an async way
  • Finally you can use Graphql to make queries and retrieve data includeing images