daddy/backend/config/seed.js

19 lines
272 B
JavaScript
Raw Normal View History

2020-06-15 14:58:59 +02:00
// Example script to seed database
var users = [];
for (i = 0; i < 10; i++) {
var data = {
full_name: fake.name(),
email: fake.email()
}
var res = graphql(" \
mutation { \
user(insert: $data) { \
id \
} \
}", { data: data })
users.push(res.user)
}