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
2 changed files with 15 additions and 11 deletions
Showing only changes of commit 01c6abdbb4 - Show all commits

View File

@ -5,7 +5,8 @@ CREATE TABLE public.users (
full_name text, full_name text,
email text UNIQUE NOT NULL CHECK (length(email) < 255), email text UNIQUE NOT NULL CHECK (length(email) < 255),
created_at timestamptz NOT NULL NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL NOT NULL DEFAULT NOW(),
updated_at timestamptz NOT NULL NOT NULL DEFAULT NOW() updated_at timestamptz NOT NULL NOT NULL DEFAULT NOW(),
role varchar(64)
); );
---- create above / drop below ---- ---- create above / drop below ----
@ -14,4 +15,3 @@ CREATE TABLE public.users (
-- then delete the separator line above. -- then delete the separator line above.
DROP TABLE public.users DROP TABLE public.users

View File

@ -1,21 +1,25 @@
// Example script to seed database // Voir https://supergraph.dev/docs/seed
var users = [ var users = [
{ {
full_name: 'William Petit', full_name: 'Admin',
email: 'wpetit@cadoles.com' email: 'admin@cadoles.com',
role: 'admin',
}, },
{ {
full_name: 'Teddy Cornaut', full_name: 'User 1',
email: 'tcornaut@cadoles.com' email: 'user1@cadoles.com',
role: 'user',
}, },
{ {
full_name: 'Benjamin Gaudé', full_name: 'User 2',
email: 'bgaude@cadoles.com' email: 'user2@cadoles.com',
role: 'user',
}, },
{ {
full_name: 'Charles Maxime Sassot', full_name: 'User 3',
email: 'cmsassot@cadoles.com' email: 'user3@cadoles.com',
role: 'user',
} }
]; ];