mirror of
https://github.com/seigler/graphql-playground
synced 2025-07-28 01:56:09 +00:00
feat(server): add mutations, store data on mongoDB
This commit is contained in:
parent
62b1a67be7
commit
fae058cc68
3 changed files with 67 additions and 25 deletions
9
server/models/author.js
Normal file
9
server/models/author.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
const mongoose = require('mongoose');
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const authorSchema = new Schema({
|
||||
name: String,
|
||||
age: Number
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Author', authorSchema);
|
Loading…
Add table
Add a link
Reference in a new issue