mongoose graphql shacdn next setup completed

This commit is contained in:
2025-11-13 15:42:26 +03:00
parent a5bdcb9705
commit 053586c5cc
34 changed files with 9309 additions and 2 deletions

10
models/User.ts Normal file
View File

@@ -0,0 +1,10 @@
import mongoose, { Schema, models } from 'mongoose';
const UserSchema = new Schema({
name: { type: String, required: true },
email: { type: String, required: true, unique: true },
});
const User = models.User || mongoose.model('User', UserSchema);
export default User;