To start your Phoenix server:
- Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror inside IEx withiex -S mix phx.server
{:absinthe, "~> 1.7"},
` used for creating graphql `
{:waffle, "~> 1.1"},
` easy to use, and offers a flexible customization on files to you can upload`
{:oban, "~> 2.17"},
{:waffle_ecto, "~> 0.0.12"}
# design
1. start with database
2. schema creation
3. waffle schema (` this contains the valid files `)
4. graphql
schema
queries
resolvers
The user should be able to consume graphql
The user should be able to upload the files using the api
The api should give relevant feedback
(.png .jpg .jpeg .pdf .txt)
### /api
### /api/graphiql
get all uploads
query {
getAllUploads{
id
fileName
theFile{
fileName
updatedAt
}
}
}
uploading a file
mutation{
uploadFile(fileName: "name", theFile: "names.txt"){
message
}
}
/priv/uploads