Class: Types::QueryType
Defined Under Namespace
Classes: DesignManagementObject
Instance Method Summary
collapse
Methods inherited from BaseObject
accepts, assignable?, authorization, authorize, authorized?, #id
#present, #unpresented
Instance Method Details
#application_settings ⇒ Object
#ci_application_settings ⇒ Object
222
223
224
|
# File 'app/graphql/types/query_type.rb', line 222
def ci_application_settings
application_settings
end
|
#ci_pipeline_stage(id:) ⇒ Object
#container_repository(id:) ⇒ Object
214
215
216
|
# File 'app/graphql/types/query_type.rb', line 214
def container_repository(id:)
GitlabSchema.find_by_gid(id)
end
|
#current_user ⇒ Object
218
219
220
|
# File 'app/graphql/types/query_type.rb', line 218
def current_user
context[:current_user]
end
|
#design_management ⇒ Object
193
194
195
|
# File 'app/graphql/types/query_type.rb', line 193
def design_management
DesignManagementObject.new(nil)
end
|
#gitpod_enabled ⇒ Object
230
231
232
|
# File 'app/graphql/types/query_type.rb', line 230
def gitpod_enabled
application_settings.gitpod_enabled
end
|
#merge_request(id:) ⇒ Object
205
206
207
|
# File 'app/graphql/types/query_type.rb', line 205
def merge_request(id:)
GitlabSchema.find_by_gid(id)
end
|
#milestone(id:, lookahead:) ⇒ Object
209
210
211
212
|
# File 'app/graphql/types/query_type.rb', line 209
def milestone(id:, lookahead:)
preloads = [:releases] if lookahead.selects?(:releases)
Gitlab::Graphql::Loaders::BatchModelLoader.new(id.model_class, id.model_id, preloads).find
end
|
#query_complexity ⇒ Object
234
235
236
|
# File 'app/graphql/types/query_type.rb', line 234
def query_complexity
context.query
end
|