Skip to content

Apollo authorization directives#2774

Open
eriksulymosi wants to merge 3 commits into
nuwave:masterfrom
magyarjeti:apollo-authorization-directives
Open

Apollo authorization directives#2774
eriksulymosi wants to merge 3 commits into
nuwave:masterfrom
magyarjeti:apollo-authorization-directives

Conversation

@eriksulymosi

@eriksulymosi eriksulymosi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Resolves #

  • Added or updated tests
  • Documented user facing changes

Changes

This PR introduces support for Apollo-style declarative authorization directives within Lighthouse. This allows schemas to better align with Apollo Router / Federation standards for authorization handled at the gateway or subgraph level.

Key additions:

  • Introduced Apollo Authorization Directives (e.g., @authenticated, @requiresScopes, @policy) to control field and type accessibility.
  • Integrated the directive definitions into the schema generation and validation pipeline.
  • Added corresponding tests to ensure schema syntax and directive handling work seamlessly with standard Apollo federation setups.

Breaking changes

None. This is a purely additive feature and does not affect existing @can, @auth or @guard directives implemented natively by Lighthouse.

@eriksulymosi

Copy link
Copy Markdown
Contributor Author

Hi @spawnia,

Just wanted to gently ping this PR to see if anyone has a moment to check it out.

It introduces support for a few essential Apollo Router directives directly into Lighthouse. This will make it much easier for developers using Lighthouse in a federated architecture or alongside Apollo Router to leverage these directives out of the box.

The implementation is non-breaking, well-scoped, and all tests are passing.

Let me know if you have any feedback or if you'd like me to tweak anything! Thanks for your time and for this great package. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant