Sha256: cad7bca527ebaae26f0ae5383e66d411092ccb0ce33fb5fa20c77372a2473825

Contents?: true

Size: 288 Bytes

Versions: 8

Compression:

Stored size: 288 Bytes

Contents

# frozen_string_literal: true

module Ibrain::Auth::Mutations
  class SignOutMutation < BaseMutation
    field :result, Boolean, null: true

    def resolve
      current_user.jti = nil
      sign_out if current_user.save

      OpenStruct.new(result: !user_signed_in?)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibrain-auth-0.1.9 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb
ibrain-auth-0.1.8 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb
ibrain-auth-0.1.7 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb
ibrain-auth-0.1.6 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb
ibrain-auth-0.1.5 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb
ibrain-auth-0.1.4 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb
ibrain-auth-0.1.3 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb
ibrain-auth-0.1.2 app/graphql/ibrain/auth/mutations/sign_out_mutation.rb