2019-09-27 08:19:24 +02:00
|
|
|
// Example script to seed database
|
|
|
|
|
|
|
|
var users = [];
|
|
|
|
|
|
|
|
for (i = 0; i < 10; i++) {
|
|
|
|
var data = {
|
2019-09-29 21:20:59 +02:00
|
|
|
full_name: fake.name(),
|
|
|
|
email: fake.email()
|
2019-09-27 08:19:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var res = graphql(" \
|
|
|
|
mutation { \
|
|
|
|
user(insert: $data) { \
|
|
|
|
id \
|
|
|
|
} \
|
|
|
|
}", { data: data })
|
|
|
|
|
|
|
|
users.push(res.user)
|
|
|
|
}
|