Fix the input values on update highlight to not send extra values

This commit is contained in:
Jackson Harper
2024-08-20 17:44:37 +08:00
parent 5f35ee74eb
commit 9e88123e98

View File

@ -91,7 +91,12 @@ export const useUpdateHighlight = () => {
input: UpdateHighlightInput
}) => {
const result = (await gqlFetcher(GQL_UPDATE_HIGHLIGHT, {
input: variables.input,
input: {
highlightId: variables.input.highlightId,
annotation: variables.input.annotation,
sharedAt: variables.input.sharedAt,
color: variables.input.color,
},
})) as UpdateHighlightData
if (result.updateHighlight.errorCodes?.length) {
throw new Error(result.updateHighlight.errorCodes[0])