Authentification JWT sur le backend super-graph #8

Manually merged
tcornaut merged 12 commits from feature/super-graph-auth into develop 2020-06-22 21:28:41 +02:00
1 changed files with 21 additions and 11 deletions
Showing only changes of commit 569a44591c - Show all commits

View File

@ -1,19 +1,29 @@
// Example script to seed database
var users = [];
for (i = 0; i < 10; i++) {
var data = {
full_name: fake.name(),
email: fake.email()
var users = [
{
full_name: 'William Petit',
email: 'wpetit@cadoles.com'
},
{
full_name: 'Teddy Cornaut',
email: 'tcornaut@cadoles.com'
},
{
full_name: 'Benjamin Gaudé',
email: 'bgaude@cadoles.com'
},
{
full_name: 'Charles Maxime Sassot',
email: 'cmsassot@cadoles.com'
}
];
for (var user, i = 0; (user = users[i]); i++) {
var res = graphql(" \
mutation { \
user(insert: $data) { \
id \
} \
}", { data: data })
users.push(res.user)
}", { data: user });
}