lib/graphql/relay/connection_field.rb in graphql-relay-0.5.0 vs lib/graphql/relay/connection_field.rb in graphql-relay-0.5.1
- old
+ new
@@ -27,10 +27,10 @@
# - Merging in the default arguments
# - Transforming its resolve function to return a connection object
# @param [GraphQL::Field] A field which returns items to be wrapped as a connection
# @return [GraphQL::Field] A field which serves a connections
def self.create(underlying_field)
- underlying_field.arguments = underlying_field.arguments.reverse_merge(DEFAULT_ARGUMENTS)
+ underlying_field.arguments = DEFAULT_ARGUMENTS.merge(underlying_field.arguments)
# TODO: make a public API on GraphQL::Field to expose this proc
original_resolve = underlying_field.instance_variable_get(:@resolve_proc)
underlying_field.resolve = get_connection_resolve(underlying_field.name, original_resolve)
underlying_field
end