Skip to content

Commit 76adf60

Browse files
artofhumanCito
authored andcommitted
Support graphql-core 2 (#55)
1 parent 1a528dc commit 76adf60

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
packages=find_packages(include=["gql*"]),
2828
install_requires=[
2929
'six>=1.10.0',
30-
'graphql-core>=0.5.0,<2',
30+
'graphql-core>=2,<3',
3131
'promise>=2.0,<3',
3232
'requests>=2.12,<3'
3333
],

tests/starwars/schema.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
'friends': GraphQLField(
6464
GraphQLList(characterInterface),
6565
description='The friends of the human, or an empty list if they have none.',
66-
resolver=lambda human, *_: getFriends(human),
66+
resolver=lambda human, info, **args: getFriends(human),
6767
),
6868
'appearsIn': GraphQLField(
6969
GraphQLList(episodeEnum),
@@ -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)