prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  If value from resolver is callable, call it with **kwargs.
  [Apollo doc](https://www.apollographql.com/docs/graphql-tools/resolvers) for default resolver says that if `field_name` resolves to function, it will be called with query arguments:
  
  > Calls a function on obj with the relevant field name and passes the query arguments into that function
  
  This can be useful for situations when parent resolver returned an object with getter functions.
  
  </issue>
  <code>
  [start of ariadne/resolvers.py]
  1 from graphql import GraphQLObjectType, GraphQLScalarType, GraphQLSchema
  2 from graphql.execution.base import ResolveInfo
  3 
  4 
  5 def resolve_parent_field(parent, name: str):
  6     if isinstance(parent, dict):
  7         return parent.get(name)
  8     return getattr(parent, name, None)
  9 
  10 
  11 def default_resolver(parent, info: ResolveInfo):
  12     return resolve_parent_field(parent, info.field_name)
  13 
  14 
  15 def resolve_to(name: str):
  16     def resolver(parent, *_):
  17         return resolve_parent_field(parent, name)
  18 
  19     return resolver
  20 
  21 
  22 def add_resolve_functions_to_schema(schema: GraphQLSchema, resolvers: dict):
  23     for type_name, type_object in schema.get_type_map().items():
  24         if isinstance(type_object, GraphQLObjectType):
  25             add_resolve_functions_to_object(type_name, type_object, resolvers)
  26         if isinstance(type_object, GraphQLScalarType):
  27             add_resolve_functions_to_scalar(type_name, type_object, resolvers)
  28 
  29 
  30 def add_resolve_functions_to_object(name: str, obj: GraphQLObjectType, resolvers: dict):
  31     type_resolvers = resolvers.get(name, {})
  32     for field_name, field_object in obj.fields.items():
  33         field_resolver = type_resolvers.get(field_name)
  34         if field_resolver:
  35             field_object.resolver = field_resolver
  36         elif field_object.resolver is None:
  37             field_object.resolver = default_resolver
  38 
  39 
  40 def add_resolve_functions_to_scalar(name: str, obj: GraphQLObjectType, resolvers: dict):
  41     scalar_resolvers = resolvers.get(name, {})
  42 
  43     serialize = scalar_resolvers.get("serialize", obj.serialize)
  44     obj.serialize = serialize
  45 
  46     parse_literal = scalar_resolvers.get("parse_literal", obj.parse_literal)
  47     obj.parse_literal = parse_literal
  48 
  49     parse_value = scalar_resolvers.get("parse_value", obj.parse_value)
  50     obj.parse_value = parse_value
  51
  [end of ariadne/resolvers.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/ariadne/resolvers.py b/ariadne/resolvers.py
  --- a/ariadne/resolvers.py
  +++ b/ariadne/resolvers.py
  @@ -2,19 +2,23 @@
   from graphql.execution.base import ResolveInfo
   
   
  -def resolve_parent_field(parent, name: str):
  +def resolve_parent_field(parent, name: str, **kwargs: dict):
       if isinstance(parent, dict):
  -        return parent.get(name)
  -    return getattr(parent, name, None)
  +        value = parent.get(name)
  +    else:
  +        value = getattr(parent, name, None)
  +    if callable(value):
  +        return value(**kwargs)
  +    return value
   
   
  -def default_resolver(parent, info: ResolveInfo):
  -    return resolve_parent_field(parent, info.field_name)
  +def default_resolver(parent, info: ResolveInfo, **kwargs):
  +    return resolve_parent_field(parent, info.field_name, **kwargs)
   
   
   def resolve_to(name: str):
  -    def resolver(parent, *_):
  -        return resolve_parent_field(parent, name)
  +    def resolver(parent, *_, **kwargs):
  +        return resolve_parent_field(parent, name, **kwargs)
   
       return resolver
  
verification_info: {"golden_diff": "diff --git a/ariadne/resolvers.py b/ariadne/resolvers.py\n--- a/ariadne/resolvers.py\n+++ b/ariadne/resolvers.py\n@@ -2,19 +2,23 @@\n from graphql.execution.base import ResolveInfo\n \n \n-def resolve_parent_field(parent, name: str):\n+def resolve_parent_field(parent, name: str, **kwargs: dict):\n     if isinstance(parent, dict):\n-        return parent.get(name)\n-    return getattr(parent, name, None)\n+        value = parent.get(name)\n+    else:\n+        value = getattr(parent, name, None)\n+    if callable(value):\n+        return value(**kwargs)\n+    return value\n \n \n-def default_resolver(parent, info: ResolveInfo):\n-    return resolve_parent_field(parent, info.field_name)\n+def default_resolver(parent, info: ResolveInfo, **kwargs):\n+    return resolve_parent_field(parent, info.field_name, **kwargs)\n \n \n def resolve_to(name: str):\n-    def resolver(parent, *_):\n-        return resolve_parent_field(parent, name)\n+    def resolver(parent, *_, **kwargs):\n+        return resolve_parent_field(parent, name, **kwargs)\n \n     return resolver\n", "issue": "If value from resolver is callable, call it with **kwargs.\n[Apollo doc](https://www.apollographql.com/docs/graphql-tools/resolvers) for default resolver says that if `field_name` resolves to function, it will be called with query arguments:\r\n\r\n> Calls a function on obj with the relevant field name and passes the query arguments into that function\r\n\r\nThis can be useful for situations when parent resolver returned an object with getter functions.\n", "before_files": [{"content": "from graphql import GraphQLObjectType, GraphQLScalarType, GraphQLSchema\nfrom graphql.execution.base import ResolveInfo\n\n\ndef resolve_parent_field(parent, name: str):\n    if isinstance(parent, dict):\n        return parent.get(name)\n    return getattr(parent, name, None)\n\n\ndef default_resolver(parent, info: ResolveInfo):\n    return resolve_parent_field(parent, info.field_name)\n\n\ndef resolve_to(name: str):\n    def resolver(parent, *_):\n        return resolve_parent_field(parent, name)\n\n    return resolver\n\n\ndef add_resolve_functions_to_schema(schema: GraphQLSchema, resolvers: dict):\n    for type_name, type_object in schema.get_type_map().items():\n        if isinstance(type_object, GraphQLObjectType):\n            add_resolve_functions_to_object(type_name, type_object, resolvers)\n        if isinstance(type_object, GraphQLScalarType):\n            add_resolve_functions_to_scalar(type_name, type_object, resolvers)\n\n\ndef add_resolve_functions_to_object(name: str, obj: GraphQLObjectType, resolvers: dict):\n    type_resolvers = resolvers.get(name, {})\n    for field_name, field_object in obj.fields.items():\n        field_resolver = type_resolvers.get(field_name)\n        if field_resolver:\n            field_object.resolver = field_resolver\n        elif field_object.resolver is None:\n            field_object.resolver = default_resolver\n\n\ndef add_resolve_functions_to_scalar(name: str, obj: GraphQLObjectType, resolvers: dict):\n    scalar_resolvers = resolvers.get(name, {})\n\n    serialize = scalar_resolvers.get(\"serialize\", obj.serialize)\n    obj.serialize = serialize\n\n    parse_literal = scalar_resolvers.get(\"parse_literal\", obj.parse_literal)\n    obj.parse_literal = parse_literal\n\n    parse_value = scalar_resolvers.get(\"parse_value\", obj.parse_value)\n    obj.parse_value = parse_value\n", "path": "ariadne/resolvers.py"}]}