|
1 | 1 | from collections import OrderedDict
|
2 |
| -from functools import wraps |
| 2 | +from functools import wraps, partial |
3 | 3 |
|
4 | 4 | import six
|
5 | 5 | from graphql.type import GraphQLField, GraphQLInputObjectField
|
|
10 | 10 | from ..classtypes.inputobjecttype import InputObjectType
|
11 | 11 | from ..classtypes.mutation import Mutation
|
12 | 12 | from ..exceptions import SkipField
|
13 |
| -from .argument import Argument, ArgumentsGroup, snake_case_args |
| 13 | +from .argument import Argument, ArgumentsGroup |
14 | 14 | from .base import (ArgumentType, GroupNamedType, LazyType, MountType,
|
15 | 15 | NamedType, OrderedType)
|
16 | 16 | from .definitions import NonNull
|
@@ -89,9 +89,6 @@ def get_type(self, schema):
|
89 | 89 | return NonNull(self.type)
|
90 | 90 | return self.type
|
91 | 91 |
|
92 |
| - def decorate_resolver(self, resolver): |
93 |
| - return snake_case_args(resolver) |
94 |
| - |
95 | 92 | def internal_type(self, schema):
|
96 | 93 | if not self.object_type:
|
97 | 94 | raise Exception('The field is not mounted in any ClassType')
|
@@ -119,7 +116,7 @@ def wrapped_func(instance, args, context, info):
|
119 | 116 |
|
120 | 117 | assert type, 'Internal type for field %s is None' % str(self)
|
121 | 118 | return GraphQLField(type, args=schema.T(arguments),
|
122 |
| - resolver=self.decorate_resolver(resolver), |
| 119 | + resolver=partial(schema.resolve, resolver), |
123 | 120 | deprecation_reason=self.deprecation_reason,
|
124 | 121 | description=description,)
|
125 | 122 |
|
|
0 commit comments