hotfix for lab (#9981)
Issue: When attempting to toggle a public feature flag that didn't exist in the workspace's feature flags array, the LabService threw a FeatureFlagException with code FEATURE_FLAG_NOT_FOUND. This prevented users from enabling public feature flags for the first time in their workspace. Fix: Modified the LabService to handle non-existent public feature flags by creating them instead of throwing an error. When the flag doesn't exist, the service now saves a new feature flag record with the provided key and value, associates it with the workspace, and returns the newly created flag.
This commit is contained in:
@ -800,7 +800,7 @@ export type Mutation = {
|
||||
skipSyncEmailOnboardingStep: OnboardingStepSuccess;
|
||||
track: Analytics;
|
||||
updateBillingSubscription: BillingUpdateOutput;
|
||||
updateLabPublicFeatureFlag: Scalars['Boolean'];
|
||||
updateLabPublicFeatureFlag: FeatureFlag;
|
||||
updateOneField: Field;
|
||||
updateOneObject: Object;
|
||||
updateOneServerlessFunction: ServerlessFunction;
|
||||
@ -2225,7 +2225,7 @@ export type UpdateLabPublicFeatureFlagMutationVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type UpdateLabPublicFeatureFlagMutation = { __typename?: 'Mutation', updateLabPublicFeatureFlag: boolean };
|
||||
export type UpdateLabPublicFeatureFlagMutation = { __typename?: 'Mutation', updateLabPublicFeatureFlag: { __typename?: 'FeatureFlag', id: any, key: FeatureFlagKey, value: boolean } };
|
||||
|
||||
export type CreateOidcIdentityProviderMutationVariables = Exact<{
|
||||
input: SetupOidcSsoInput;
|
||||
@ -3884,7 +3884,11 @@ export type GetEnvironmentVariablesGroupedLazyQueryHookResult = ReturnType<typeo
|
||||
export type GetEnvironmentVariablesGroupedQueryResult = Apollo.QueryResult<GetEnvironmentVariablesGroupedQuery, GetEnvironmentVariablesGroupedQueryVariables>;
|
||||
export const UpdateLabPublicFeatureFlagDocument = gql`
|
||||
mutation UpdateLabPublicFeatureFlag($input: UpdateLabPublicFeatureFlagInput!) {
|
||||
updateLabPublicFeatureFlag(input: $input)
|
||||
updateLabPublicFeatureFlag(input: $input) {
|
||||
id
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type UpdateLabPublicFeatureFlagMutationFn = Apollo.MutationFunction<UpdateLabPublicFeatureFlagMutation, UpdateLabPublicFeatureFlagMutationVariables>;
|
||||
|
||||
Reference in New Issue
Block a user