Skip to content

Introduce new GraphQL directive to restrict access to endpoint based on Feature Flag #15330

@fellowseb

Description

@fellowseb

Introduce new GraphQL directive to restrict access to endpoint based on Feature Flag values.

Example:

type Query {
  doSomething: String! @ff(flags: ["SOME_FLAG", "SOME_OTHER_FLAG"])
}

This definition will make queries to doSomething throw neither one of the feature flags is set.

Optionally introduce a softFail option that will resolve to null instead of returning an error:

type Query {
  doSomething: String @ff(flags: ["SOME_FLAG", "SOME_OTHER_FLAG"], softFail: true)
}

This can be helpful for queries happening super early, even before (or while) retrieving the FFs in the frontend.

Metadata

Metadata

Assignees

Labels

technical improvementTechnical refactor or improvement is needed

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions