Skip to content

Commit cece343

Browse files
committed
Fixed test starwars resolvers
1 parent a3e36a5 commit cece343

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/starwars/starwars_schema.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
description='Which movies they appear in.'
4646
),
4747
},
48-
resolve_type=lambda character, *_: humanType if getHuman(character.id) else droidType,
48+
resolve_type=lambda character, info: humanType if getHuman(character.id) else droidType,
4949
)
5050

5151
humanType = GraphQLObjectType(
@@ -92,7 +92,7 @@
9292
'friends': GraphQLField(
9393
GraphQLList(characterInterface),
9494
description='The friends of the droid, or an empty list if they have none.',
95-
resolver=lambda droid, *_: getFriends(droid),
95+
resolver=lambda droid, info, **args: getFriends(droid),
9696
),
9797
'appearsIn': GraphQLField(
9898
GraphQLList(episodeEnum),
@@ -118,7 +118,7 @@
118118
type=episodeEnum,
119119
)
120120
},
121-
resolver=lambda root, args, *_: getHero(args.get('episode')),
121+
resolver=lambda root, info, **args: getHero(args.get('episode')),
122122
),
123123
'human': GraphQLField(
124124
humanType,
@@ -128,7 +128,7 @@
128128
type=GraphQLNonNull(GraphQLString),
129129
)
130130
},
131-
resolver=lambda root, args, *_: getHuman(args['id']),
131+
resolver=lambda root, info, **args: getHuman(args['id']),
132132
),
133133
'droid': GraphQLField(
134134
droidType,
@@ -138,7 +138,7 @@
138138
type=GraphQLNonNull(GraphQLString),
139139
)
140140
},
141-
resolver=lambda root, args, *_: getDroid(args['id']),
141+
resolver=lambda root, info, **args: getDroid(args['id']),
142142
),
143143
}
144144
)

0 commit comments

Comments
 (0)