super-graph/internal/serv/tmpl/seed.js
2020-04-16 00:26:32 -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)
}