This is a Task Management API built with NestJS, MongoDB, and GraphQL. It provides basic task management features such as creating, updating, retrieving, and deleting tasks with user authentication and authorization.
- CRUD operations for managing tasks.
- Pagination for retrieving tasks.
- Filtering tasks by status and priority.
- GraphQL API.
-
Clone the repository:
git clone https://github.com/your-username/task-management-api.git
-
Navigate into the project directory:
cd task-management-api -
Install the dependencies:
npm install
Create a .env file at the root of the project and add the following variables:
MONGODB_URI=mongodb://localhost:27017/task_management_db # MongoDB connection string
PORT=3000 # Application PortTo start the application, run the following command:
-
Development mode:
npm run start:dev
-
Production mode:
npm run start:prod
-
GraphQL Playground:
Visit http://localhost:3000/graphql in your browser to access the GraphQL Playground.
For the complete API schema, including all queries, mutations, and type definitions, refer to the schema.gql file in the root directory. This file outlines the structure of all available endpoints and their corresponding inputs and outputs.
To run the tests, use the following command:
npm run test