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 // Example script to seed database
var users = []; 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 (i = 0; i < 10; i++) { for (var user, i = 0; (user = users[i]); i++) {
var data = { var res = graphql(" \
full_name: fake.name(),
email: fake.email()
}
var res = graphql(" \
mutation { \ mutation { \
user(insert: $data) { \ user(insert: $data) { \
id \ id \
} \ } \
}", { data: data }) }", { data: user });
users.push(res.user)
} }