From 2eb42bde384b94a27ea12a1cf0f453fafc922e74 Mon Sep 17 00:00:00 2001 From: Stan Hu <stanhu@gmail.com> Date: Wed, 12 Jan 2022 21:17:48 -0800 Subject: [PATCH] Update Gemfile.lock and drop comments Now that we've updated graphiql-rails, we no longer need to include the comments about the CSP workaround. Fix the GraphQL explorer tests that broke as a result of the update. --- Gemfile | 3 --- Gemfile.lock | 4 ++-- spec/features/graphiql_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index f86271774cb12..473194f4e6287 100644 --- a/Gemfile +++ b/Gemfile @@ -98,9 +98,6 @@ gem 'rack-cors', '~> 1.0.6', require: 'rack/cors' # GraphQL API gem 'graphql', '~> 1.11.10' -# NOTE: graphiql-rails v1.5+ doesn't work: https://gitlab.com/gitlab-org/gitlab/issues/31771 -# TODO: remove app/views/graphiql/rails/editors/show.html.erb when https://github.com/rmosolgo/graphiql-rails/pull/71 is released: -# https://gitlab.com/gitlab-org/gitlab/issues/31747 gem 'graphiql-rails', '~> 1.8' gem 'apollo_upload_server', '~> 2.1.0' gem 'graphql-docs', '~> 1.6.0', group: [:development, :test] diff --git a/Gemfile.lock b/Gemfile.lock index 2a54b7aaaec96..41356d997c9c6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -561,7 +561,7 @@ GEM grape_logging (1.8.3) grape rack - graphiql-rails (1.4.10) + graphiql-rails (1.8.0) railties sprockets-rails graphlient (0.4.0) @@ -1498,7 +1498,7 @@ DEPENDENCIES grape-entity (~> 0.10.0) grape-path-helpers (~> 1.7.0) grape_logging (~> 1.7) - graphiql-rails (~> 1.4.10) + graphiql-rails (~> 1.8) graphlient (~> 0.4.0) graphql (~> 1.11.10) graphql-docs (~> 1.6.0) diff --git a/spec/features/graphiql_spec.rb b/spec/features/graphiql_spec.rb index 91f53b4bb7c70..7729cdaa36217 100644 --- a/spec/features/graphiql_spec.rb +++ b/spec/features/graphiql_spec.rb @@ -9,7 +9,7 @@ end it 'has the correct graphQLEndpoint' do - expect(page.body).to include('var graphQLEndpoint = "/api/graphql";') + expect(page.body).to include('<div id="graphiql-container" data-graphql-endpoint-path="/api/graphql"') end end @@ -26,7 +26,7 @@ end it 'has the correct graphQLEndpoint' do - expect(page.body).to include('var graphQLEndpoint = "/gitlab/root/api/graphql";') + expect(page.body).to include('<div id="graphiql-container" data-graphql-endpoint-path="/gitlab/root/api/graphql"') end end end -- GitLab