diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-03 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-03 09:08:42 +0000 |
commit | f14507e586a7f75f0fb71a1d8468b7361be860d4 (patch) | |
tree | a8aa547b517a7ae5626c902bfb558c1fc5386c4e /config | |
parent | f4d27d532e3abeecd1caffeb3a56e698ae982e5b (diff) | |
download | gitlab-ce-f14507e586a7f75f0fb71a1d8468b7361be860d4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/graphql.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/initializers/graphql.rb b/config/initializers/graphql.rb index 2b21c9d9729..206c4daceac 100644 --- a/config/initializers/graphql.rb +++ b/config/initializers/graphql.rb @@ -6,6 +6,8 @@ GraphQL::Field.accepts_definitions(authorize: GraphQL::Define.assign_metadata_ke GraphQL::Schema::Object.accepts_definition(:authorize) GraphQL::Schema::Field.accepts_definition(:authorize) -GitlabSchema.middleware << GraphQL::Schema::TimeoutMiddleware.new(max_seconds: ENV.fetch('GITLAB_RAILS_GRAPHQL_TIMEOUT', 30).to_i) do |timeout_error, query| - Gitlab::GraphqlLogger.error(message: timeout_error.to_s, query: query.query_string, query_variables: query.provided_variables) +Gitlab::Application.config.after_initialize do + GitlabSchema.middleware << GraphQL::Schema::TimeoutMiddleware.new(max_seconds: ENV.fetch('GITLAB_RAILS_GRAPHQL_TIMEOUT', 30).to_i) do |timeout_error, query| + Gitlab::GraphqlLogger.error(message: timeout_error.to_s, query: query.query_string, query_variables: query.provided_variables) + end end |