Feature/Use fastify instead of express (#1)

- Replaced Apollo Server with Mercurius for GraphQL API
- Updated resolvers to use Mercurius-compatible GraphQL implementation
- Migrated from Express to Fastify for server framework
- Improved error handling with GraphQL error extensions
- Added Zod for environment variable validation
- Updated Prisma schema and migrations
- Configured CORS and WebSocket subscriptions
- Simplified GraphQL schema and resolver structure
- Enhanced type safety and code organization
- Replaced Apollo Server with Mercurius for GraphQL API
- Updated resolvers to use Mercurius-compatible GraphQL implementation
- Migrated from Express to Fastify for server framework
- Improved error handling with GraphQL error extensions
- Added Zod for environment variable validation
- Updated Prisma schema and migrations
- Configured CORS and WebSocket subscriptions
- Simplified GraphQL schema and resolver structure
- Enhanced type safety and code organization

Reviewed-on: #1
Co-authored-by: Jusemon <juansmm@outlook.com>
Co-committed-by: Jusemon <juansmm@outlook.com>
This commit is contained in:
Juan Sebastián Montoya 2025-03-06 19:15:56 -05:00 committed by Juan Sebastián Montoya
parent b4e5a04126
commit 6214b503bc
47 changed files with 4968 additions and 5424 deletions

View file

@ -1,44 +1,39 @@
{
"name": "api",
"version": "1.0.0",
"description": "This project was bootstrapped with Fastify-CLI.",
"main": "dist/index.js",
"directories": {
"test": "test"
},
"scripts": {
"dev": "nodemon --exec ts-node src/index.ts",
"build": "tsc",
"test": "ts-node --test test/**/*.test.ts",
"start": "node dist/index.js",
"dev": "nodemon --delay 2000ms src/index.ts",
"prisma:generate": "prisma generate",
"prisma:migrate": "prisma migrate dev",
"prisma:studio": "prisma studio",
"prisma:init": "prisma migrate dev --name init",
"check-types": "tsc --noEmit"
"build": "tsc"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@apollo/server": "^4.10.0",
"@graphql-tools/schema": "^10.0.2",
"@fastify/cors": "^11.0.0",
"@prisma/client": "^6.4.1",
"@types/ws": "^8.5.14",
"apollo-server": "^3.13.0",
"apollo-server-express": "^3.13.0",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.18.2",
"graphql": "^16.8.1",
"graphql-subscriptions": "^2.0.0",
"graphql-ws": "^5.14.0",
"subscriptions-transport-ws": "^0.11.0",
"ws": "^8.18.1"
"dotenv": "^16.4.7",
"fastify": "^5.2.1",
"fastify-cli": "^7.3.0",
"fastify-plugin": "^5.0.0",
"graphql": "^16.10.0",
"mercurius": "^16.1.0",
"mercurius-codegen": "^6.0.1",
"zod": "^3.24.2"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/node": "^20.11.20",
"nodemon": "^3.1.0",
"prisma": "^6.4.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"@repo/eslint-config": "*",
"@repo/typescript-config": "*",
"typescript": "5.8.2",
"prisma": "^6.4.1"
}
}