summaryrefslogtreecommitdiff
path: root/config/initializers/graphql.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 21:08:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 21:08:48 +0000
commit4d0c47058a89d71d3417ad3bd73781882c8998e8 (patch)
tree808679f68ca8a8511d12779cf618785d6978be81 /config/initializers/graphql.rb
parentdf2eda3f14dccb703bd7054d4ddde7803cb1fe7e (diff)
downloadgitlab-ce-4d0c47058a89d71d3417ad3bd73781882c8998e8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers/graphql.rb')
-rw-r--r--config/initializers/graphql.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/config/initializers/graphql.rb b/config/initializers/graphql.rb
index 44a9644f481..81317a3d87a 100644
--- a/config/initializers/graphql.rb
+++ b/config/initializers/graphql.rb
@@ -6,8 +6,6 @@ GraphQL::Field.accepts_definitions(authorize: GraphQL::Define.assign_metadata_ke
GraphQL::Schema::Object.accepts_definition(:authorize)
GraphQL::Schema::Field.accepts_definition(:authorize)
-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
+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