Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mainawycliffe/flutter-graphql-upload-example
This repo is to demo how to upload files using GraphQL and Flutter.
https://github.com/mainawycliffe/flutter-graphql-upload-example
flutter graphql
Last synced: 5 days ago
JSON representation
This repo is to demo how to upload files using GraphQL and Flutter.
- Host: GitHub
- URL: https://github.com/mainawycliffe/flutter-graphql-upload-example
- Owner: mainawycliffe
- Created: 2019-08-03T09:27:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-29T16:35:12.000Z (over 4 years ago)
- Last Synced: 2024-06-20T06:24:59.828Z (5 months ago)
- Topics: flutter, graphql
- Language: Dart
- Homepage: https://codinglatte.com/posts/flutter/flutter-and-graphql-how-to-upload-files/
- Size: 2.22 MB
- Stars: 23
- Watchers: 1
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flutter GraphQL Image Uploads
This repo is to demo how to upload files using GraphQL and Flutter. The backend is build using Golang but can be run using docker - no need to install golang.
## Backend
To run the backend, you can use [docker compose](https://docs.docker.com/compose/), simply run `docker-compose up -d --build` at the root directory.
### Upload Image Mutation
To test the server, you can use the built in GraphiQL, whose URL is [http://localhost:8080](http://localhost:8080).
You can run the upload file Mutation below:
```graphql
mutation($file: Upload!) {
upload(file: $file)
}
```## Frontend
To run the frontend, change directory to the `flutter` directory, and run `flutter run`. Make sure you have flutter [installed](https://flutter.dev/docs/get-started/install).
### Demo
### Accompanying Post
You can find a detailed explanation for the fronted [here](https://codinglatte.com/posts/flutter/flutter-and-graphql-how-to-upload-files/).
## Contributions
PR are welcome.