We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Create `resolve_to` utility
Python variables are usually named using the `snake_case`, whereas majority of JS written today uses the `camelCase`. Ariadne will need to provide a way to resolve one to another.

The idea is to create `resolver_for` function taking single `name` argument and returning resolver for specified attr/key name, enabling **explicit** mapping as such:

```
resolvers_map = {
    "User": {
        "lastVisitedOn": resolve_to("last_visited_on")
    }
}
```

Other advantage of having such utility would be arbitrary field names:

```
resolvers_map = {
    "User": {
        "lastVisitedOn": resolve_to("last_visit")
    }
}
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ariadne/resolvers.py`
Content:
```
1 from graphql import GraphQLObjectType, GraphQLScalarType, GraphQLSchema
2 from graphql.execution.base import ResolveInfo
3 
4 
5 def default_resolver(parent, info: ResolveInfo):
6     if isinstance(parent, dict):
7         return parent.get(info.field_name)
8     return getattr(parent, info.field_name, None)
9 
10 
11 def add_resolve_functions_to_schema(schema: GraphQLSchema, resolvers: dict):
12     for type_name, type_object in schema.get_type_map().items():
13         if isinstance(type_object, GraphQLObjectType):
14             add_resolve_functions_to_object(type_name, type_object, resolvers)
15         if isinstance(type_object, GraphQLScalarType):
16             add_resolve_function_to_scalar(type_name, type_object, resolvers)
17 
18 
19 def add_resolve_functions_to_object(name: str, obj: GraphQLObjectType, resolvers: dict):
20     type_resolver = resolvers.get(name, {})
21     for field_name, field_object in obj.fields.items():
22         field_resolver = type_resolver.get(field_name, default_resolver)
23         field_object.resolver = field_resolver
24 
25 
26 def add_resolve_function_to_scalar(name: str, obj: GraphQLObjectType, resolvers: dict):
27     serializer = resolvers.get(name, obj.serialize)
28     obj.serialize = serializer
29
```

Path: `ariadne/__init__.py`
Content:
```
1 from .build_schema import build_schema_from_type_definitions
2 from .executable_schema import make_executable_schema
3 from .resolvers import add_resolve_functions_to_schema, default_resolver
4 
5 __all__ = [
6     "add_resolve_functions_to_schema",
7     "build_schema_from_type_definitions",
8     "default_resolver",
9     "make_executable_schema",
10 ]
11
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/ariadne/__init__.py b/ariadne/__init__.py
--- a/ariadne/__init__.py
+++ b/ariadne/__init__.py
@@ -1,10 +1,11 @@
 from .build_schema import build_schema_from_type_definitions
 from .executable_schema import make_executable_schema
-from .resolvers import add_resolve_functions_to_schema, default_resolver
+from .resolvers import add_resolve_functions_to_schema, default_resolver, resolve_to
 
 __all__ = [
     "add_resolve_functions_to_schema",
     "build_schema_from_type_definitions",
     "default_resolver",
     "make_executable_schema",
+    "resolve_to",
 ]
diff --git a/ariadne/resolvers.py b/ariadne/resolvers.py
--- a/ariadne/resolvers.py
+++ b/ariadne/resolvers.py
@@ -2,10 +2,21 @@
 from graphql.execution.base import ResolveInfo
 
 
-def default_resolver(parent, info: ResolveInfo):
+def resolve_parent_field(parent, name: str):
     if isinstance(parent, dict):
-        return parent.get(info.field_name)
-    return getattr(parent, info.field_name, None)
+        return parent.get(name)
+    return getattr(parent, name, None)
+
+
+def default_resolver(parent, info: ResolveInfo):
+    return resolve_parent_field(parent, info.field_name)
+
+
+def resolve_to(name: str):
+    def resolver(parent, *_):
+        return resolve_parent_field(parent, name)
+
+    return resolver
 
 
 def add_resolve_functions_to_schema(schema: GraphQLSchema, resolvers: dict):

{"golden_diff": "diff --git a/ariadne/__init__.py b/ariadne/__init__.py\n--- a/ariadne/__init__.py\n+++ b/ariadne/__init__.py\n@@ -1,10 +1,11 @@\n from .build_schema import build_schema_from_type_definitions\n from .executable_schema import make_executable_schema\n-from .resolvers import add_resolve_functions_to_schema, default_resolver\n+from .resolvers import add_resolve_functions_to_schema, default_resolver, resolve_to\n \n __all__ = [\n     \"add_resolve_functions_to_schema\",\n     \"build_schema_from_type_definitions\",\n     \"default_resolver\",\n     \"make_executable_schema\",\n+    \"resolve_to\",\n ]\ndiff --git a/ariadne/resolvers.py b/ariadne/resolvers.py\n--- a/ariadne/resolvers.py\n+++ b/ariadne/resolvers.py\n@@ -2,10 +2,21 @@\n from graphql.execution.base import ResolveInfo\n \n \n-def default_resolver(parent, info: ResolveInfo):\n+def resolve_parent_field(parent, name: str):\n     if isinstance(parent, dict):\n-        return parent.get(info.field_name)\n-    return getattr(parent, info.field_name, None)\n+        return parent.get(name)\n+    return getattr(parent, name, None)\n+\n+\n+def default_resolver(parent, info: ResolveInfo):\n+    return resolve_parent_field(parent, info.field_name)\n+\n+\n+def resolve_to(name: str):\n+    def resolver(parent, *_):\n+        return resolve_parent_field(parent, name)\n+\n+    return resolver\n \n \n def add_resolve_functions_to_schema(schema: GraphQLSchema, resolvers: dict):\n", "issue": "Create `resolve_to` utility\nPython variables are usually named using the `snake_case`, whereas majority of JS written today uses the `camelCase`. Ariadne will need to provide a way to resolve one to another.\r\n\r\nThe idea is to create `resolver_for` function taking single `name` argument and returning resolver for specified attr/key name, enabling **explicit** mapping as such:\r\n\r\n```\r\nresolvers_map = {\r\n    \"User\": {\r\n        \"lastVisitedOn\": resolve_to(\"last_visited_on\")\r\n    }\r\n}\r\n```\r\n\r\nOther advantage of having such utility would be arbitrary field names:\r\n\r\n```\r\nresolvers_map = {\r\n    \"User\": {\r\n        \"lastVisitedOn\": resolve_to(\"last_visit\")\r\n    }\r\n}\r\n```\n", "before_files": [{"content": "from graphql import GraphQLObjectType, GraphQLScalarType, GraphQLSchema\nfrom graphql.execution.base import ResolveInfo\n\n\ndef default_resolver(parent, info: ResolveInfo):\n    if isinstance(parent, dict):\n        return parent.get(info.field_name)\n    return getattr(parent, info.field_name, None)\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_function_to_scalar(type_name, type_object, resolvers)\n\n\ndef add_resolve_functions_to_object(name: str, obj: GraphQLObjectType, resolvers: dict):\n    type_resolver = resolvers.get(name, {})\n    for field_name, field_object in obj.fields.items():\n        field_resolver = type_resolver.get(field_name, default_resolver)\n        field_object.resolver = field_resolver\n\n\ndef add_resolve_function_to_scalar(name: str, obj: GraphQLObjectType, resolvers: dict):\n    serializer = resolvers.get(name, obj.serialize)\n    obj.serialize = serializer\n", "path": "ariadne/resolvers.py"}, {"content": "from .build_schema import build_schema_from_type_definitions\nfrom .executable_schema import make_executable_schema\nfrom .resolvers import add_resolve_functions_to_schema, default_resolver\n\n__all__ = [\n    \"add_resolve_functions_to_schema\",\n    \"build_schema_from_type_definitions\",\n    \"default_resolver\",\n    \"make_executable_schema\",\n]\n", "path": "ariadne/__init__.py"}], "after_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_function_to_scalar(type_name, type_object, resolvers)\n\n\ndef add_resolve_functions_to_object(name: str, obj: GraphQLObjectType, resolvers: dict):\n    type_resolver = resolvers.get(name, {})\n    for field_name, field_object in obj.fields.items():\n        field_resolver = type_resolver.get(field_name, default_resolver)\n        field_object.resolver = field_resolver\n\n\ndef add_resolve_function_to_scalar(name: str, obj: GraphQLObjectType, resolvers: dict):\n    serializer = resolvers.get(name, obj.serialize)\n    obj.serialize = serializer\n", "path": "ariadne/resolvers.py"}, {"content": "from .build_schema import build_schema_from_type_definitions\nfrom .executable_schema import make_executable_schema\nfrom .resolvers import add_resolve_functions_to_schema, default_resolver, resolve_to\n\n__all__ = [\n    \"add_resolve_functions_to_schema\",\n    \"build_schema_from_type_definitions\",\n    \"default_resolver\",\n    \"make_executable_schema\",\n    \"resolve_to\",\n]\n", "path": "ariadne/__init__.py"}]}