mirror of
https://github.com/wassname/talk.git
synced 2026-07-26 13:37:38 +08:00
[CORL-1156] Q&A Feature Flag Fix (#3000)
* fix: fixed bug with feature flag handling * chore: version bump
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
import * as story from "coral-server/models/story";
|
||||
import { hasFeatureFlag } from "coral-server/models/tenant";
|
||||
|
||||
import {
|
||||
GQLFEATURE_FLAG,
|
||||
GQLSTORY_MODE,
|
||||
GQLStorySettingsTypeResolver,
|
||||
} from "../schema/__generated__/types";
|
||||
import { GQLStorySettingsTypeResolver } from "../schema/__generated__/types";
|
||||
|
||||
import { LiveConfigurationInput } from "./LiveConfiguration";
|
||||
|
||||
@@ -35,18 +30,7 @@ export const StorySettings: GQLStorySettingsTypeResolver<StorySettingsInput> = {
|
||||
};
|
||||
},
|
||||
// FEATURE_FLAG:ENABLE_QA
|
||||
mode: (s, input, ctx) => {
|
||||
if (s.mode) {
|
||||
return s.mode;
|
||||
}
|
||||
|
||||
// FEATURE_FLAG:DEFAULT_QA_STORY_MODE
|
||||
if (hasFeatureFlag(ctx.tenant, GQLFEATURE_FLAG.DEFAULT_QA_STORY_MODE)) {
|
||||
return GQLSTORY_MODE.QA;
|
||||
}
|
||||
|
||||
return GQLSTORY_MODE.COMMENTS;
|
||||
},
|
||||
mode: (s, input, ctx) => story.resolveStoryMode(s, ctx.tenant),
|
||||
experts: (s, input, ctx) => {
|
||||
if (s.expertIDs) {
|
||||
return ctx.loaders.Users.user.loadMany(s.expertIDs);
|
||||
|
||||
Reference in New Issue
Block a user