mirror of
https://github.com/wassname/talk.git
synced 2026-07-14 11:18:50 +08:00
don't save clientMutationId when creating announcement (#3049)
* don't save clientMutationId when creating announcement * move mutationId filtering from resolver to mutation Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
This commit is contained in:
@@ -71,7 +71,7 @@ export const Settings = ({
|
||||
enableFeatureFlag(mongo, redis, tenantCache, tenant, flag),
|
||||
disableFeatureFlag: (flag: GQLFEATURE_FLAG) =>
|
||||
disableFeatureFlag(mongo, redis, tenantCache, tenant, flag),
|
||||
createAnnouncement: (input: GQLCreateAnnouncementInput) =>
|
||||
createAnnouncement: (input: WithoutMutationID<GQLCreateAnnouncementInput>) =>
|
||||
createAnnouncement(mongo, redis, tenantCache, tenant, input),
|
||||
deleteAnnouncement: () =>
|
||||
deleteAnnouncement(mongo, redis, tenantCache, tenant),
|
||||
|
||||
@@ -251,9 +251,13 @@ export const Mutation: Required<GQLMutationTypeResolver<void>> = {
|
||||
flags: await ctx.mutators.Settings.disableFeatureFlag(input.flag),
|
||||
clientMutationId: input.clientMutationId,
|
||||
}),
|
||||
createAnnouncement: async (source, { input }, ctx) => ({
|
||||
createAnnouncement: async (
|
||||
source,
|
||||
{ input: { clientMutationId, ...input } },
|
||||
ctx
|
||||
) => ({
|
||||
settings: await ctx.mutators.Settings.createAnnouncement(input),
|
||||
clientMutationId: input.clientMutationId,
|
||||
clientMutationId,
|
||||
}),
|
||||
deleteAnnouncement: async (source, { input }, ctx) => ({
|
||||
settings: await ctx.mutators.Settings.deleteAnnouncement(),
|
||||
|
||||
Reference in New Issue
Block a user