@@ -212,7 +212,7 @@ If the :ref:`ResolverParamParent` is a dictionary, the resolver will look for a
212
212
213
213
from graphene import ObjectType, String, Field, Schema
214
214
215
- PersonValueObject = namedtuple(' Person' , ' first_name' , ' last_name' )
215
+ PersonValueObject = namedtuple(' Person' , [ ' first_name' , ' last_name' ] )
216
216
217
217
class Person(ObjectType):
218
218
first_name = String()
@@ -238,10 +238,10 @@ If the :ref:`ResolverParamParent` is a dictionary, the resolver will look for a
238
238
}
239
239
''' )
240
240
# With default resolvers we can resolve attributes from an object..
241
- assert result[ ' data' ] [' me' ] == {" firstName" : " Luke" , " lastName" : " Skywalker" }
241
+ assert result. data[' me' ] == {" firstName" : " Luke" , " lastName" : " Skywalker" }
242
242
243
243
# With default resolvers, we can also resolve keys from a dictionary..
244
- assert result[ ' data' ][ ' my_best_friend ' ] == {" firstName" : " R2" , " lastName" : " D2" }
244
+ assert result. data[ ' myBestFriend ' ] == {" firstName" : " R2" , " lastName" : " D2" }
245
245
246
246
Advanced
247
247
~~~~~~~~
@@ -280,7 +280,7 @@ An error will be thrown:
280
280
281
281
TypeError : resolve_hello() missing 1 required positional argument: ' name'
282
282
283
- You can fix this error in serveral ways. Either by combining all keyword arguments
283
+ You can fix this error in several ways. Either by combining all keyword arguments
284
284
into a dict :
285
285
286
286
.. code:: python
0 commit comments