lib/graphql/relay/connection_resolve.rb in graphql-1.5.7.1 vs lib/graphql/relay/connection_resolve.rb in graphql-1.5.8
- old
+ new
@@ -1,20 +1,18 @@
# frozen_string_literal: true
module GraphQL
module Relay
class ConnectionResolve
- def initialize(field, underlying_resolve, max_page_size: nil)
+ def initialize(field, underlying_resolve)
@field = field
@underlying_resolve = underlying_resolve
- @max_page_size = max_page_size
+ @max_page_size = field.connection_max_page_size
end
def call(obj, args, ctx)
nodes = @underlying_resolve.call(obj, args, ctx)
if ctx.schema.lazy?(nodes)
- @field.prepare_lazy(nodes, args, ctx).then { |resolved_nodes|
- build_connection(resolved_nodes, args, obj, ctx)
- }
+ nodes
else
build_connection(nodes, args, obj, ctx)
end
end