Skip to content
Snippets Groups Projects

[graphql] Convert to using the new query interpreter runtime

Merged Brett Walker requested to merge bw-graphql-interpreter into master
5 files
+ 21
7
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -3,6 +3,15 @@ module Gitlab
module Graphql
module Board
class IssuesConnectionExtension < GraphQL::Schema::Field::ConnectionExtension
DEFAULT_CONNECTION_ARGS = %w[after before first last].freeze
def apply
# GraphQL::Schema::Field::ConnectionExtension redefines the
# :after, :before, :first, and :last arguments. This causes a
# DuplicateNamesError for graphql gem > 1.13.
super unless (field.arguments.keys & DEFAULT_CONNECTION_ARGS).any?
end
def after_resolve(value:, object:, context:, **rest)
::Boards::Issues::ListService
.initialize_relative_positions(object.list.board, context[:current_user], value.nodes)
Loading