Sha256: 0cb7ca44d1b4bdda3258675b0f2d998b15c184de3f24d96498fd29b61aaeaae6

Contents?: true

Size: 559 Bytes

Versions: 24

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Core
    # This type represents the current user session.
    SessionType = GraphQL::ObjectType.define do
      name "Session"
      description "The current session"

      field :user, UserType, "The current user" do
        resolve ->(obj, _args, _ctx) { obj }
      end

      field :verifiedUserGroups, !types[!UserGroupType], "The current user verified user groups" do
        resolve ->(obj, _args, _ctx) { Decidim::UserGroups::ManageableUserGroups.for(obj).verified }
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
decidim-core-0.23.6 app/types/decidim/core/session_type.rb
decidim-core-0.23.5 app/types/decidim/core/session_type.rb
decidim-core-0.23.4 app/types/decidim/core/session_type.rb
decidim-core-0.23.3 app/types/decidim/core/session_type.rb
decidim-core-0.23.2 app/types/decidim/core/session_type.rb
decidim-core-0.23.1 app/types/decidim/core/session_type.rb
decidim-core-0.23.1.rc1 app/types/decidim/core/session_type.rb
decidim-core-0.23.0 app/types/decidim/core/session_type.rb
decidim-core-0.22.0 app/types/decidim/core/session_type.rb
decidim-core-0.21.0 app/types/decidim/core/session_type.rb
decidim-core-0.20.1 app/types/decidim/core/session_type.rb
decidim-core-0.20.0 app/types/decidim/core/session_type.rb
decidim-core-0.19.1 app/types/decidim/core/session_type.rb
decidim-core-0.18.1 app/types/decidim/core/session_type.rb
decidim-core-0.19.0 app/types/decidim/core/session_type.rb
decidim-core-0.17.2 app/types/decidim/core/session_type.rb
decidim-core-0.18.0 app/types/decidim/core/session_type.rb
decidim-core-0.17.1 app/types/decidim/core/session_type.rb
decidim-core-0.16.1 app/types/decidim/core/session_type.rb
decidim-core-0.17.0 app/types/decidim/core/session_type.rb