Pass dict to context
argument from SchemaDirectiveVisitor.__init__
#1019
Labels
context
argument from SchemaDirectiveVisitor.__init__
#1019
SchemaDirectiveVisitor
accept'scontext
as one of constructors arguments, but it's not passed to directives at any point, and doesn't even exist when directive is initiated, making this arg's value always beNone
.We could initialize empty dict in
visit_schema_directives
and then pass it to directive instances to let them share state between fields without having to resort to type attributes which are leaky abstraction in multi-schema projects.The text was updated successfully, but these errors were encountered: