Backport of 'Upgrade graphql gem and backport GlobalID serialization fixes'

What does this MR do and why?

Backports a802cdc9 ("Upgrade graphql gem and backport GlobalID serialization fixes") from the default branch to 18-11-stable-ee, together with the two spec-only prep commits the gem bump requires on this branch: 2459f749 ("Remove usage of Field.from_options") and 33b1d7d9 ("Remove usage of SKIP constant").

The change bumps the graphql gem from 2.5.11 to 2.6.10 and adds config/initializers/graphql_subscriptions_serialize_patch.rb, which carries two unreleased upstream fixes to GraphQL::Subscriptions::Serialize — the serializer that round-trips user-controlled subscription arguments through ActionCable/Redis.

18.11 sits outside the original three-version backport window, so it was raised separately with release management. 19.1, 19.2 and 19.3 already carry the fix; 19.0 is being backported alongside this MR.

Why the gem bump comes with it

The initializer is pinned to graphql 2.6.10 by an explicit version guard, and the third upstream fix it depends on (restricting timestamp deserialization) ships in the gem at 2.6.8 — it exists in no 2.5.x release, as that series ended at 2.5.26. Backporting the initializer alone would mean rewriting it and hand-maintaining a second copy of a security patch, so the gem moves with it and the commit applies as-is.

Why the spec prep commits come with it

graphql 2.6 removed two APIs that only our specs use:

  • Schema::Field.from_options — folded into has_fields#field, which now calls field_class.new(**kwargs) directly. Seven resolver specs built fields through it. Fixed by 2459f749 (7 files, +17 −21).
  • the GraphQL::Execution::SKIP singleton — Skip now carries a per-field path, so the shared instance was dropped in favour of Skip.new. One spec used it. Fixed by 33b1d7d9 (1 file, +2 −2).

Both landed on the default branch after 18-11-stable-ee diverged, which is why this branch lacks them — and why 1d82305f could be a gem-only bump on master, the prep having already merged there. All affected specs pass locally (73 and 47 examples, 0 failures) with no RuboCop offenses.

Risk

The 2.5 → 2.6 minor needed no application changes on the default branch: 1d82305f ("Upgrade GraphQL to 2.6.3") touched only the Gemfile, lockfiles and the two introspection fixtures.

Both breaking changes that apply to this branch reach test code only and are handled by the prep commits above. The rest of the range doesn't apply — Schema::Visibility is unused in the codebase, none of our tracers hook execute_query_lazy, and the only other removed constant, NO_SELECTIONS, is unreferenced. Gem metadata is unchanged — same runtime dependencies, same required_ruby_version.

Regenerated, not cherry-picked

  • Gemfile.lock, Gemfile.next.lock, Gemfile.checksum, Gemfile.next.checksum (via bundle install + bundler:gemfile:sync)
  • public/-/graphql/introspection_result.json and introspection_result_no_deprecated.json (via gitlab:graphql:generate_all_introspection_schemas) — a VARIABLE_DEFINITION directive-location reordering, identical to what 1d82305f produced on master

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
  • The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
  • Required labels have been applied to this merge request
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:test-on-omnibus-ee job has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.

Note to the merge request author and maintainer

If you have questions about the patch release process, please:

Edited by Vlad Wolanyk

Merge request reports

Loading
Loading