Skip to content

Pass dict to context argument from SchemaDirectiveVisitor.__init__ #1019

Open
@rafalp

Description

@rafalp

SchemaDirectiveVisitor accept's context 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 be None.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions