Skip to content

Commit 67d28f8

Browse files
committed
introspection: use consistent naming for 'resolve' args
Replicates graphql/graphql-js@d680d07
1 parent 6bc87e9 commit 67d28f8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/graphql/type/introspection.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,19 @@
8383
fields=lambda: {
8484
# Note: The fields onOperation, onFragment and onField are deprecated
8585
"name": GraphQLField(
86-
GraphQLNonNull(GraphQLString), resolve=lambda obj, _info: obj.name
86+
GraphQLNonNull(GraphQLString),
87+
resolve=lambda directive, _info: directive.name,
8788
),
8889
"description": GraphQLField(
89-
GraphQLString, resolve=lambda obj, _info: obj.description
90+
GraphQLString, resolve=lambda directive, _info: directive.description
9091
),
9192
"isRepeatable": GraphQLField(
9293
GraphQLNonNull(GraphQLBoolean),
93-
resolve=lambda obj, _info: obj.is_repeatable,
94+
resolve=lambda directive, _info: directive.is_repeatable,
9495
),
9596
"locations": GraphQLField(
9697
GraphQLNonNull(GraphQLList(GraphQLNonNull(__DirectiveLocation))),
97-
resolve=lambda obj, _info: obj.locations,
98+
resolve=lambda directive, _info: directive.locations,
9899
),
99100
"args": GraphQLField(
100101
GraphQLNonNull(GraphQLList(GraphQLNonNull(__InputValue))),

0 commit comments

Comments
 (0)