update seed.ts, resolvers and typeDefs based on latest schema#1
update seed.ts, resolvers and typeDefs based on latest schema#1Prajjawalk merged 1 commit intomainfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (24)
📝 WalkthroughWalkthroughThis pull request migrates the application's data model from a US-centric geography to Sudan-focused locations with updated data sources (ACLED, Social Media Monitor, FEWS NET). It refactors all entity IDs from Changes
Sequence Diagram(s)sequenceDiagram
actor Client
participant AuthResolver
participant Prisma as Prisma Client
participant Database
Client->>AuthResolver: requestEmailVerification()
AuthResolver->>AuthResolver: Validate user authenticated
AuthResolver->>AuthResolver: Check email not verified
AuthResolver->>AuthResolver: Generate 32-byte hex token
AuthResolver->>AuthResolver: Set 24-hour expiry
AuthResolver->>Prisma: Create emailVerification record
Prisma->>Database: INSERT emailVerification
Database-->>Prisma: Confirmation
Prisma-->>AuthResolver: Record created
AuthResolver-->>Client: Return true
Note over Client,Database: Email with token sent to user
Client->>AuthResolver: verifyEmail(token)
AuthResolver->>Prisma: Find emailVerification by token
Prisma->>Database: SELECT emailVerification
Database-->>Prisma: Record with expiry
Prisma-->>AuthResolver: Verification record
AuthResolver->>AuthResolver: Validate not expired
AuthResolver->>Prisma: Update user (emailVerified=true)
Prisma->>Database: UPDATE user
AuthResolver->>Prisma: Delete emailVerification record
Prisma->>Database: DELETE emailVerification
AuthResolver-->>Client: Return true (email verified)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Summary by CodeRabbit
Release Notes