Update field.rb
Update field.rb

Before the 1.8 update you could use closures to pass information from a field to it's type. Now it's much more difficult (using :method).

Example from our codebase:

```
...
# a dynamically generated field
field generated_name, type, method: :resolver, extras: [:ast_node]
...
def resolver(:ast_node)
  generated_name = parse_name(ast_node.name)
  # do stuff based on the name

```

This pulled request would allow this:

```
# a dynamically generated field
field generated_name, type, method: :resolver, extras: [:name]
...
def resolver(:name)
  # do stuff based on the name
```

or even this:
```
class SpecialField < GraphQL::Schema::Field
  attr_reader :klass, :attribute

  def initialize(*args, klass:, attribute:, **kwargs, &block)
    @klass = klass
    @attribute = attribute
...
end

...
field_class PermissionField

field generated_name, type, klass: klass, attribute: attribute, method: :resolver, extras: [:klass, :attribute]
...

def resolver(klass:, attribute:)
  # resolve based on a class and attribute

```
rmosolgo/graphql-ruby,rmosolgo/graphql-ruby,xuorig/graphql-ruby,xuorig/graphql-ruby,nevesenin/graphql-ruby,nevesenin/graphql-ruby,nevesenin/graphql-ruby,nevesenin/graphql-ruby,rmosolgo/graphql-ruby,xuorig/graphql-ruby,rmosolgo/graphql-ruby