Handle undefined feature flag case in `featureFlagEnabled` query
Issue: `featureFlagEnabled` GraphQL query fails on FOS... (#480888 - closed)
What does this MR do and why?
The GitLab Workflow extension performs the featureFlagEnabled
query for an EE only feature flag, duo_workflow
. This causes Web IDE feature specs to fail in FOSS_ONLY
mode, where ee
code is not available, since the Feature.enabled?
method called within the query resolver raises an exception when attempting to check the status of a feature flag that doesn't exist.
This MR attempts to resolve this by catching InvalidFeatureFlagError
and passing the error message as a GQL error response.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Returns GQL error if flag is not defined | Otherwise, returns feature flag value: |
---|---|
- We'll also want to make sure the GitLab FOSS pipeline passes
Edited by Cindy Halim