This repository has been archived by the owner on May 30, 2021. It is now read-only.
V0.2.0
Data migration:
CREATE TABLE "organization" (
id uuid DEFAULT gen_random_uuid() NOT NULL CONSTRAINT organization_pkey PRIMARY KEY,
name text NOT NULL,
created_at timestamp WITH TIME ZONE DEFAULT now() NOT NULL,
updated_at timestamp WITH TIME ZONE DEFAULT now() NOT NULL
);
ALTER TABLE "user" ADD COLUMN organization_id uuid NULL CONSTRAINT user_organization_id_fkey REFERENCES "organization" ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE "user" ADD CONSTRAINT user_email_organization_id_key UNIQUE (email, organization_id);
ALTER TABLE "user" DROP CONSTRAINT user_email_key;
Breaking changes:
Now the mutations auth_register
, auth_change_password
, and auth_activate_account
returns an object instead a boolean value.
{
"affected_rows": 0 | 1
}
Now the mutations auth_login
and refresh_token
response return all fields in lower case with words separeted with underline:
{
"access_token": String!,
"refresh_token": String!,
"user_id": ID!,
"organization_id": String
}
A new optional parameter has ban added in auth_login
, auth_register
, and auth_activate_account
. You can specify which organization do you want use, by default is null
.