Class: Mutations::Auth::ValidateToken
- Inherits:
-
GraphQL::Schema::Mutation
- Object
- GraphQL::Schema::Mutation
- Mutations::Auth::ValidateToken
- Defined in:
- app/graphql/mutations/auth/validate_token.rb
Overview
mutation {
validateToken {
success
valid
user {
email
}
}
}
Instance Method Summary collapse
Instance Method Details
#resolve ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/graphql/mutations/auth/validate_token.rb', line 19 def resolve user = context[:current_user] { errors: [], success: user.present?, user: user, valid: user.present?, } end |