-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added option to modify icebreakers with ai (#9268)
* feat: added option to modify icebreakers with ai * code cleanup, analytics * code cleanup * fix: added success property to icebreaker modified analytics event * refactor: use relay mutation helper for modify check in question mutation * feat: add modified question char limit
- Loading branch information
1 parent
8cbc121
commit 70db85f
Showing
13 changed files
with
444 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/client/mutations/useModifyCheckInQuestionMutation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import graphql from 'babel-plugin-relay/macro' | ||
import {useMutation, UseMutationConfig} from 'react-relay' | ||
import {useModifyCheckInQuestionMutation as TModifyCheckInQuestionMutation} from '../__generated__/useModifyCheckInQuestionMutation.graphql' | ||
|
||
graphql` | ||
fragment useModifyCheckInQuestionMutation_success on ModifyCheckInQuestionSuccess { | ||
modifiedCheckInQuestion | ||
} | ||
` | ||
|
||
const mutation = graphql` | ||
mutation useModifyCheckInQuestionMutation( | ||
$meetingId: ID! | ||
$checkInQuestion: String! | ||
$modifyType: ModifyType! | ||
) { | ||
modifyCheckInQuestion( | ||
meetingId: $meetingId | ||
checkInQuestion: $checkInQuestion | ||
modifyType: $modifyType | ||
) { | ||
... on ErrorPayload { | ||
error { | ||
message | ||
} | ||
} | ||
...useModifyCheckInQuestionMutation_success @relay(mask: false) | ||
} | ||
} | ||
` | ||
|
||
export const useModifyCheckInQuestionMutation = () => { | ||
const [commit, submitting] = useMutation<TModifyCheckInQuestionMutation>(mutation) | ||
const execute = (config: UseMutationConfig<TModifyCheckInQuestionMutation>) => { | ||
return commit(config) | ||
} | ||
return [execute, submitting] as const | ||
} |
Oops, something went wrong.