1
0

auth.api.graphql 841 B

12345678910111213141516171819202122
  1. type Query {
  2. me: CurrentUser
  3. }
  4. type Mutation {
  5. """
  6. Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
  7. The `rememberMe` option applies when using cookie-based sessions, and if `true` it will set the maxAge of the session cookie
  8. to 1 year.
  9. """
  10. login(username: String!, password: String!, rememberMe: Boolean): NativeAuthenticationResult!
  11. "Authenticates the user using a named authentication strategy"
  12. authenticate(input: AuthenticationInput!, rememberMe: Boolean): AuthenticationResult!
  13. logout: Success!
  14. }
  15. # Populated at run-time
  16. input AuthenticationInput
  17. union NativeAuthenticationResult = CurrentUser | InvalidCredentialsError | NativeAuthStrategyError
  18. union AuthenticationResult = CurrentUser | InvalidCredentialsError