Skip to content

Directives in namespaces collected via RegisterDirectiveNamespaces no longer override default directives #2401

@tminich

Description

@tminich

Describe the bug

Overriding default directives in a namespace collected by the RegisterDirectiveNamespaces event used to override default directives in lighthouse 5.x, this no longer works in 6.x

Expected behavior/Solution

This is in reply/reference to #2396
I used to override default directives in a module by defining them and returning the namespace via RegisterDirectiveNamespaces but this stopped working in 6.x. Hence I tried rebinding via the Laravel container system, which worked, beside the issue described in #2396, flawlessly. So I assumed this was now the intended way.
At the end of the day I can do it either way, but I need a way that works for everything =)

Steps to reproduce

  1. Define a directive supposed to override a default directive in a namespace (eg. EnumDirective)
  2. Directive isn't overridden, neither functionally nor in documentation
    or
  3. Use container binding to override a default directive
  4. Directive is overridden functionally but not in documentation

Lighthouse Version

6.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error within Lighthouse

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions