mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #4171 from omnivore-app/fix/web-label-update-gql
Fix string interp on update label mutation
This commit is contained in:
commit
ee6cd036c8
1 changed files with 5 additions and 10 deletions
|
|
@ -12,15 +12,8 @@ export async function updateLabelMutation(
|
|||
input: UpdateLabelInput
|
||||
): Promise<string | undefined> {
|
||||
const mutation = gql`
|
||||
mutation {
|
||||
updateLabel(
|
||||
input: {
|
||||
color: "${input.color}"
|
||||
name: "${input.name}"
|
||||
description: "${input.description}"
|
||||
labelId: "${input.labelId}"
|
||||
}
|
||||
) {
|
||||
mutation UpdateLabel($input: UpdateLabelInput!) {
|
||||
updateLabel(input: $input) {
|
||||
... on UpdateLabelSuccess {
|
||||
label {
|
||||
id
|
||||
|
|
@ -38,7 +31,9 @@ export async function updateLabelMutation(
|
|||
`
|
||||
|
||||
try {
|
||||
const data = await gqlFetcher(mutation)
|
||||
const data = await gqlFetcher(mutation, {
|
||||
input,
|
||||
})
|
||||
const output = data as any
|
||||
return output?.updatedLabel
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue