Class: Types::BaseObject

Inherits:
GraphQL::Schema::Object
  • Object
show all
Defined in:
app/graphql/types/base_object.rb

Direct Known Subclasses

AccessLevelType, Admin::Analytics::InstanceStatistics::MeasurementType, Admin::SidekiqQueues::DeleteJobsResponseType, AlertManagement::AlertStatusCountsType, AlertManagement::AlertType, AwardEmojis::AwardEmojiType, BoardListType, BoardType, BranchType, Ci::DetailedStatusType, Ci::GroupType, Ci::JobType, Ci::PipelineType, Ci::StageType, CommitType, ContainerExpirationPolicyType, DesignManagement::DesignAtVersionType, DesignManagement::DesignCollectionType, DesignManagement::DesignType, DesignManagement::VersionType, DesignManagementType, DiffRefsType, DiffStatsSummaryType, DiffStatsType, EnvironmentType, ErrorTracking::SentryDetailedErrorType, ErrorTracking::SentryErrorCollectionType, ErrorTracking::SentryErrorFrequencyType, ErrorTracking::SentryErrorStackTraceContextType, ErrorTracking::SentryErrorStackTraceEntryType, ErrorTracking::SentryErrorStackTraceType, ErrorTracking::SentryErrorTagsType, ErrorTracking::SentryErrorType, EvidenceType, GrafanaIntegrationType, GroupMemberType, IssueStatusCountsType, IssueType, JiraImportType, JiraUserType, LabelType, MergeRequestType, MetadataType, Metrics::DashboardType, Metrics::Dashboards::AnnotationType, MilestoneStatsType, MilestoneType, MutationType, NamespaceType, Notes::DiffPositionType, Notes::DiscussionType, Notes::NoteType, PackageType, PermissionTypes::BasePermissionType, ProjectMemberType, ProjectStatisticsType, ProjectType, Projects::Services::BaseServiceType, Projects::Services::JiraProjectType, Projects::Services::JiraServiceType, PrometheusAlertType, QueryType, ReleaseAssetLinkType, ReleaseAssetsType, ReleaseLinksType, ReleaseSourceType, ReleaseType, RepositoryType, RootStorageStatisticsType, SnippetType, Snippets::BlobType, Snippets::BlobViewerType, TaskCompletionStatus, TodoType, Tree::BlobType, Tree::SubmoduleType, Tree::TreeEntryType, Tree::TreeType, UserStatusType, UserType

Instance Method Summary collapse

Instance Method Details

#current_userObject


16
17
18
# File 'app/graphql/types/base_object.rb', line 16

def current_user
  context[:current_user]
end

#idObject

All graphql fields exposing an id, should expose a global id.


12
13
14
# File 'app/graphql/types/base_object.rb', line 12

def id
  GitlabSchema.id_from_object(object)
end