Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove feature flag owner #10319

Merged
merged 3 commits into from
Oct 16, 2024
Merged

Conversation

nickoferrall
Copy link
Contributor

With this PR, we can remove feature flag owners. I prefer creating a new mutation rather than updating applyFeatureFlag because I think it's better to have distinct names to make it clearer for the sales team.

To Test

Add a feature flag, apply a feature flag to a subject, e.g. an orgId, and the remove it like so:

mutation { 
  removeFeatureFlagOwner(flagName: "hasSingleColumnStandupsFlag", subjects: {
    orgIds: ["AQQ5zJw652"]
  }
  ) {
    __typename
    ... on RemoveFeatureFlagOwnerSuccess {
      organizations {
  name
        featureFlag(featureName: "hasSingleColumnStandupsFlag")
      }
    }
    ... on ErrorPayload {
      error {
        message
      }
    }  
  }
}

Copy link
Contributor

@Dschoordsch Dschoordsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not test

"""
Remove a feature flag from specified subjects (users, teams, or organizations)
"""
removeFeatureFlagOwner(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Might just be me, but I find this name confusing: removing the owner of the feature flag sounds backwards. If I take your candy, did I remove you as the owner from that candy?
I would just call it removeFeatureFlag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha yeah, but as there's featureFlag and featureFlagOwner, I'd prefer to explicitly say we're removing the owner. There's already a deleteFeatureFlag mutation, which could get confusing

@nickoferrall nickoferrall merged commit dfdb68c into master Oct 16, 2024
6 checks passed
@nickoferrall nickoferrall deleted the chore/remove-feature-flag-owner branch October 16, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants