2019-07-07 11:18:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
GraphQL::ObjectType.accepts_definitions(authorize: GraphQL::Define.assign_metadata_key(:authorize))
|
|
|
|
GraphQL::Field.accepts_definitions(authorize: GraphQL::Define.assign_metadata_key(:authorize))
|
|
|
|
|
|
|
|
GraphQL::Schema::Object.accepts_definition(:authorize)
|
|
|
|
GraphQL::Schema::Field.accepts_definition(:authorize)
|
2020-01-03 18:37:03 +05:30
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
Gitlab::Application.config.after_initialize do
|
|
|
|
GitlabSchema.middleware << GraphQL::Schema::TimeoutMiddleware.new(max_seconds: Gitlab.config.gitlab.graphql_timeout) do |timeout_error, query|
|
|
|
|
Gitlab::GraphqlLogger.error(message: timeout_error.to_s, query: query.query_string, query_variables: query.provided_variables)
|
|
|
|
end
|
2020-01-03 18:37:03 +05:30
|
|
|
end
|