YummYume/symmetrical-potato

[FEATURE] Registration GraphQL mutation

Closed this issue · 0 comments

Type of feature

Something new

The name of the feature

Registration (back)

Feature description

The GraphQL endpoint should expose a mutation to register.

Register mutation :

  • username should be unique and 100 characters max.
  • email should be unique and a valid email.
  • plainPassword should be at least 8 characters with 1 uppercase, 1 lowercase and 1 special character. Should be 100 characters max and required.
  • locale should be either 'fr' or 'en' (see UserLocaleEnum). This locale is only used for off request treatment (like sending emails).
  • reason the reason as to why they want to create an account. Should be 2000 characters max and required.
  • Send an email whenever an account is created.
  • Create tests for this mutation.

Validate account mutation :

  • An admin can approve the registration request of a user.
  • An admin should receive an email when a registration account is sent.
  • When the account is validated, send a mail to the user. When it is not, do nothing (?).
  • Create a test for this mutation.

Additional information

Linked with #44.