The Project Management API is a comprehensive Rust-based web application designed to streamline and enhance the management of projects. It is built on the robust Rocket web framework, known for its speed and reliability, and utilizes Async-GraphQL, a powerful library for building GraphQL APIs in Rust. This combination offers a high-performance backend capable of handling complex project management tasks with ease.
The application is structured around the Rocket web framework and Async-GraphQL library, with the following key components:
src/handler/graphql_handler.rs
) defines the schema, queries, and mutations for the GraphQL API.src/config/
, src/schema/
).tests/
).To get started with the Project Management API, ensure you have Rust and Cargo installed. Then, you can clone the repository and run the application using Rocket's built-in server.
Clone the repository:
git clone https://github.com/AkshitVadodariya1201/Project-Management-API.git
Change into the project directory:
cd project-management-api
Run the application using Cargo:
cargo run
Access the GraphQL playground at http://localhost:8000
to interact with the API.
The Project Management API provides a GraphQL interface for managing projects and their owners. You can perform the following operations using the provided queries and mutations:
Queries:
projects
: Retrieve a list of all projects.project(id: ID!)
: Retrieve a specific project by ID.owners
: Retrieve a list of all owners.owner(id: ID!)
: Retrieve a specific owner by ID.Mutations:
createProject(input: ProjectInput!)
: Create a new project with the specified input.updateProject(id: ID!, input: ProjectInput!)
: Update an existing project with the specified ID and input.deleteProject(id: ID!)
: Delete a project with the specified ID.createOwner(input: OwnerInput!)
: Create a new owner with the specified input.updateOwner(id: ID!, input: OwnerInput!)
: Update an existing owner with the specified ID and input.deleteOwner(id: ID!)
: Delete an owner with the specified ID.For detailed information on the available queries and mutations, refer to the GraphQL schema in the GraphQL playground.
To test the Project Management API endpoints, you can use Hoppscotch, a popular API testing tool. Follow the steps below to set up and run the API test using Hoppscotch:
Install Hoppscotch:
Launch Hoppscotch:
Import the Project Management API collection:
Configure the environment variables:
Run the API test:
By following these steps, you can easily test the Project Management API using Hoppscotch and ensure the functionality and reliability of the endpoints.
The Project Management API includes a suite of integration tests to ensure the correctness and reliability of the application. You can run the tests using Cargo:
cargo test
The tests cover GraphQL queries and mutations, as well as JSON data handling, to validate the application's functionality.
The Project Management API was developed as part of a project management course and is intended for educational purposes. It leverages the Rocket web framework and Async-GraphQL library to provide a high-performance backend for managing projects and owners.
For more information on Rocket, Async-GraphQL, and other libraries used in this project, refer to the official documentation:
This project is licensed under the MIT License - see the LICENSE file for details.
Happy coding!🦀🚀