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.
Introduce new GraphQL directive to restrict access to endpoint based on Feature Flag values.
Example:
This definition will make queries to
doSomethingthrow neither one of the feature flags is set.Optionally introduce a
softFailoption that will resolve tonullinstead of returning an error:This can be helpful for queries happening super early, even before (or while) retrieving the FFs in the frontend.