diff --git a/Gemfile b/Gemfile index 96fe46fbd..fd80488b5 100644 --- a/Gemfile +++ b/Gemfile @@ -59,7 +59,7 @@ gem 'git', '~> 1.5' gem 'graphql', '~> 1.9', '>= 1.9.4' gem 'graphql-errors', '~> 0.3.0' gem 'graphql-batch', '~> 0.4.0' -# gem 'batch-loader', '~> 1.4', '>= 1.4.1' +gem 'batch-loader', '~> 1.4', '>= 1.4.1' gem 'graphql-cache', '~> 0.6.0', git: "https://github.com/stackshareio/graphql-cache" # gem 'ddtrace', '~> 0.23.3' diff --git a/Gemfile.lock b/Gemfile.lock index 49ae8639a..f8439d389 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,25 +64,26 @@ GEM audited (4.8.0) activerecord (>= 4.0, < 5.3) aws-eventstream (1.0.3) - aws-partitions (1.175.0) - aws-sdk-core (3.55.0) + aws-partitions (1.177.0) + aws-sdk-core (3.56.0) aws-eventstream (~> 1.0, >= 1.0.2) aws-partitions (~> 1.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.21.0) - aws-sdk-core (~> 3, >= 3.53.0) + aws-sdk-kms (1.22.0) + aws-sdk-core (~> 3, >= 3.56.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.42.0) - aws-sdk-core (~> 3, >= 3.53.0) + aws-sdk-s3 (1.43.0) + aws-sdk-core (~> 3, >= 3.56.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sdk-sqs (1.16.0) - aws-sdk-core (~> 3, >= 3.53.0) + aws-sdk-sqs (1.17.0) + aws-sdk-core (~> 3, >= 3.56.0) aws-sigv4 (~> 1.1) aws-sigv4 (1.1.0) aws-eventstream (~> 1.0, >= 1.0.2) base32-url (0.5) + batch-loader (1.4.1) bcrypt (3.1.13) benchmark-perf (0.4.0) benchmark-trend (0.2.0) @@ -181,7 +182,7 @@ GEM docopt (0.6.1) domain_name (0.5.20180417) unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.2) + dotenv (2.7.4) ebnf (1.1.3) rdf (~> 3.0) sxp (~> 1.0) @@ -203,6 +204,7 @@ GEM elasticsearch-transport (6.8.0) faraday multi_json + equatable (0.6.0) equivalent-xml (0.6.0) nokogiri (>= 1.4.3) erubi (1.8.0) @@ -213,8 +215,13 @@ GEM factory_bot_rails (4.11.1) factory_bot (~> 4.11.1) railties (>= 3.0.0) - faker (1.9.3) + faker (1.9.4) i18n (>= 0.7) + pastel (~> 0.7.2) + thor (~> 0.20.0) + tty-pager (~> 0.12.0) + tty-screen (~> 0.6.5) + tty-tree (~> 0.3.0) faraday (0.15.4) multipart-post (>= 1.2, < 3) faraday-encoding (0.0.5) @@ -256,7 +263,7 @@ GEM concurrent-ruby (~> 1.0) i18n_data (0.8.0) iso8601 (0.9.1) - jaro_winkler (1.5.2) + jaro_winkler (1.5.3) jmespath (1.4.0) json (1.8.6) json-ld (3.0.2) @@ -328,7 +335,7 @@ GEM minitest (5.11.3) money (6.13.4) i18n (>= 0.6.4, <= 2) - msgpack (1.2.10) + msgpack (1.3.0) multi_json (1.13.1) multipart-post (2.1.1) mysql2 (0.4.10) @@ -343,6 +350,9 @@ GEM parallel (1.17.0) parser (2.6.3.0) ast (~> 2.4.0) + pastel (0.7.3) + equatable (~> 0.6) + tty-color (~> 0.5) postrank-uri (1.0.24) addressable (>= 2.4.0) nokogiri (>= 1.8.0) @@ -491,6 +501,11 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) + strings (0.1.5) + strings-ansi (~> 0.1) + unicode-display_width (~> 1.5) + unicode_utils (~> 1.4) + strings-ansi (0.1.0) strip_attributes (1.9.0) activemodel (>= 3.0, < 7.0) sxp (1.0.2) @@ -501,6 +516,14 @@ GEM thread_safe (0.3.6) tilt (2.0.9) trollop (2.9.9) + tty-color (0.5.0) + tty-pager (0.12.1) + strings (~> 0.1.4) + tty-screen (~> 0.6) + tty-which (~> 0.4) + tty-screen (0.6.5) + tty-tree (0.3.0) + tty-which (0.4.1) turnout (2.5.0) i18n (>= 0.7, < 2) rack (>= 1.3, < 3) @@ -534,6 +557,7 @@ DEPENDENCIES aws-sdk-s3 aws-sdk-sqs (~> 1.3) base32-url (~> 0.3) + batch-loader (~> 1.4, >= 1.4.1) bcrypt (~> 3.1.7) bergamasco (~> 0.3.10) better_errors diff --git a/config/application.rb b/config/application.rb index e1f005e56..0ddb2aea3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -101,6 +101,9 @@ class Application < Rails::Application # compress responses with deflate or gzip config.middleware.use Rack::Deflater + # use batch loader + config.middleware.use BatchLoader::Middleware + # set Active Job queueing backend if ENV['AWS_REGION'] config.active_job.queue_adapter = :shoryuken