2019-02-17 20:19:49 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-03 21:30:32 -05:00
|
|
|
GraphQL::ObjectType.accepts_definitions(authorize: GraphQL::Define.assign_metadata_key(:authorize))
|
2019-02-17 20:19:49 -05:00
|
|
|
GraphQL::Field.accepts_definitions(authorize: GraphQL::Define.assign_metadata_key(:authorize))
|
2019-03-03 21:30:32 -05:00
|
|
|
|
|
|
|
GraphQL::Schema::Object.accepts_definition(:authorize)
|
2019-03-01 12:30:42 -05:00
|
|
|
GraphQL::Schema::Field.accepts_definition(:authorize)
|
2020-01-02 16:07:38 -05:00
|
|
|
|
|
|
|
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
|