AmandaCleto / flutter--graphql-crud-users-and-posts--front

This project it's a learning project in how to use GraphQL. Consuming Api from flutter--graphql-crud-users-and-posts--api-back.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphQL Users & Posts

Flutter Dart


πŸ“· Illustrative gifs of the project:


πŸ“· Illustrative image of the Figma:


πŸ’‘ Idea:

Create a Flutter Project in order to connect to a GraphQL Server (https://github.com/AmandaCleto/vanilla--graphql-crud-users-and-posts-api--back/). For that, I'll be using graphql_flutter as dependence. The project is a simple crud of posts and users, where you can create/read/delete posts from an user and create/read/update/delete users; note: when deleting an user all its posts will be deleted as well.


πŸŽ‡ Apprenticeship:

This project was meant to be a learning project in how to use GraphQL in Flutter, for that, I first create a GraphQL server by following the tutorial from Mateus Silva, then I proceed by creating a simple landing page layout in Figma web design app, so I could use as prototype to my Flutter app.

By using graphql_flutter as dependence, I could fetch only the necessary responses my pages would display, and also could refetch only when needed.

graphql_flutter is an easy-to-use library that is filled with lots of functionalities, yet, in this project I focus in how to use the basics of Mutations and Queries.


Configuring env file:

To configure the project's environment variable file, follow the steps below:

  • Step 1- Create an .env file at the root of the project;
  • Step 2- Copy the contents of the .env.example file to your new .env file;
  • Step 3- Paste your API_HTTP_LINK KEY into the variable API_HTTP_LINK

After the env setup, proceed with the steps below ✌


πŸš€ How to execute the project:

To run and view the project, you will need to follow the next steps.

flutter run

🌐 Links:

Flutter:
https://flutter.dev/

Dart:
Dart docs


License

This project is licensed under the [MIT] license - see the LICENSE.md file for more details.

About

This project it's a learning project in how to use GraphQL. Consuming Api from flutter--graphql-crud-users-and-posts--api-back.

License:MIT License


Languages

Language:Dart 97.6%Language:Ruby 1.7%Language:Swift 0.5%Language:Kotlin 0.2%Language:Objective-C 0.0%