Skip to content

Commit ae97307

Browse files
author
Ted Zadniprovskyi
committed
Allow user to pass in a custom resolve info context type (#213)
1 parent e256148 commit ae97307

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/graphql/type/definition.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,9 @@ def to_kwargs(self) -> GraphQLFieldKwargs:
554554
def __copy__(self) -> GraphQLField: # pragma: no cover
555555
return self.__class__(**self.to_kwargs())
556556

557+
TContext = TypeVar("TContext")
557558

558-
class GraphQLResolveInfo(NamedTuple):
559+
class GraphQLResolveInfo(Generic[TContext], NamedTuple):
559560
"""Collection of information passed to the resolvers.
560561
561562
This is always passed as the first argument to the resolvers.

0 commit comments

Comments
 (0)