GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
371 B

  1. package mutations
  2. import (
  3. "context"
  4. "git.aiterp.net/rpdata/api/graphql/resolver/types"
  5. "git.aiterp.net/rpdata/api/internal/session"
  6. )
  7. // Logout resolves mutation.logout
  8. func (r *MutationResolver) Logout(ctx context.Context) (*types.SessionResolver, error) {
  9. session := session.FromContext(ctx)
  10. session.Logout()
  11. return &types.SessionResolver{S: session}, nil
  12. }