Module: Types::Namespaces::LinkPaths

Includes:
BaseInterface
Defined in:
app/graphql/types/namespaces/link_paths.rb,
app/graphql/types/namespaces/link_paths/comment_template_type.rb,
app/graphql/types/namespaces/link_paths/user_namespace_links_type.rb,
app/graphql/types/namespaces/link_paths/group_namespace_links_type.rb,
app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb

Defined Under Namespace

Classes: CommentTemplateType, GroupNamespaceLinksType, ProjectNamespaceLinksType, UserNamespaceLinksType

Constant Summary collapse

TYPE_MAPPINGS =

rubocop: enable Graphql/AuthorizeTypes, GraphQL/GraphqlName

{
  ::Group => ::Types::Namespaces::LinkPaths::GroupNamespaceLinksType,
  ::Namespaces::ProjectNamespace => ::Types::Namespaces::LinkPaths::ProjectNamespaceLinksType,
  ::Namespaces::UserNamespace => ::Types::Namespaces::LinkPaths::UserNamespaceLinksType
}.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.resolve_type(object, _context) ⇒ Object



171
172
173
# File 'app/graphql/types/namespaces/link_paths.rb', line 171

def self.resolve_type(object, _context)
  type_mappings[object.class] || raise("Unknown GraphQL type for namespace type #{object.class}")
end

.type_mappingsObject



167
168
169
# File 'app/graphql/types/namespaces/link_paths.rb', line 167

def self.type_mappings
  TYPE_MAPPINGS
end

Instance Method Details

#autocomplete_award_emojis_pathObject



205
206
207
# File 'app/graphql/types/namespaces/link_paths.rb', line 205

def autocomplete_award_emojis_path
  url_helpers.autocomplete_award_emojis_path
end

#emails_help_page_pathObject



189
190
191
# File 'app/graphql/types/namespaces/link_paths.rb', line 189

def emails_help_page_path
  url_helpers.help_page_path('development/emails.md', anchor: 'email-namespace')
end

#markdown_help_pathObject



193
194
195
# File 'app/graphql/types/namespaces/link_paths.rb', line 193

def markdown_help_path
  url_helpers.help_page_path('user/markdown.md')
end

#new_trial_pathObject

override in EE



210
211
212
# File 'app/graphql/types/namespaces/link_paths.rb', line 210

def new_trial_path
  url_helpers.self_managed_new_trial_url
end

#quick_actions_help_pathObject



197
198
199
# File 'app/graphql/types/namespaces/link_paths.rb', line 197

def quick_actions_help_path
  url_helpers.help_page_path('user/project/quick_actions.md')
end

#registerObject



177
178
179
# File 'app/graphql/types/namespaces/link_paths.rb', line 177

def register
  url_helpers.new_user_registration_path(redirect_to_referer: 'yes')
end

#report_abuseObject



181
182
183
# File 'app/graphql/types/namespaces/link_paths.rb', line 181

def report_abuse
  url_helpers.add_category_abuse_reports_path
end

#sign_inObject



185
186
187
# File 'app/graphql/types/namespaces/link_paths.rb', line 185

def 
  url_helpers.new_user_session_path(redirect_to_referer: 'yes')
end

#user_export_emailObject



201
202
203
# File 'app/graphql/types/namespaces/link_paths.rb', line 201

def user_export_email
  current_user&.notification_email_or_default
end