super-graph/cmd/internal/serv/tmpl/seed.js
2020-04-10 02:27:43 -04:00

19 lines
272 B
JavaScript

// 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)
}