lib/graphql/relay/connection_resolve.rb in graphql-0.18.1 vs lib/graphql/relay/connection_resolve.rb in graphql-0.18.2
- old
+ new
@@ -1,17 +1,17 @@
module GraphQL
module Relay
class ConnectionResolve
- def initialize(field_name, underlying_resolve, max_page_size: nil)
- @field_name = field_name
+ def initialize(field, underlying_resolve, max_page_size: nil)
+ @field = field
@underlying_resolve = underlying_resolve
@max_page_size = max_page_size
end
def call(obj, args, ctx)
nodes = @underlying_resolve.call(obj, args, ctx)
connection_class = GraphQL::Relay::BaseConnection.connection_for_nodes(nodes)
- connection_class.new(nodes, args, max_page_size: @max_page_size, parent: obj)
+ connection_class.new(nodes, args, field: @field, max_page_size: @max_page_size, parent: obj)
end
end
end
end