ask-and-trust - v1.0.0
    Preparing search index...

    AuthResolver handles all authentication-related GraphQL mutations and queries.

    Index

    Constructors

    Methods

    • Mutation for logging out the user by clearing the authentication token cookie.

      Parameters

      • context: Context

        The context object that contains cookies for session management.

      Returns Promise<string>

      A string message confirming successful logout.

    • Query to get the currently authenticated user.

      Parameters

      • context: Context

        The context object that contains cookies for session management.

      Returns Promise<User>

      A Promise that resolves to the current User object.

      AppError If no user is found or if there is any error in the process.