Hi! This repository will contain flutter applications using various libraries designed to work with GraphQL.
- graphql_flutter
- graphql_flutter with hooks
- graphql_flutter with code gen
- just graphql
Get the docker-compose.yaml
file from this repository or clone via terminal:
# in a new directory run
wget https://raw.githubusercontent.com/hasura/graphql-engine/stable/install-manifests/docker-compose/docker-compose.yaml
# or run
curl https://raw.githubusercontent.com/hasura/graphql-engine/stable/install-manifests/docker-compose/docker-compose.yaml -o docker-compose.yml
Run the command to start the hasura:
$ docker compose up -d
After docker starts the graphql container, go to the url localhost:8080/
You can read about how to create a database and a schema here:
https://hasura.io/docs/latest/getting-started/docker-simple/
Create simple tables following this diagram:
Congrats! Now you can make a request to a GraphQL API!
Clone project following this command:
$ git clone https://github.com/YuryMorozov2001/graphql-and-flutter.git
And run this command in the flutter client path
$ flutter pub get
$ flutter run