Update to use pageId instead of linkId for SetLabels API

This commit is contained in:
Jackson Harper 2022-04-12 20:50:06 -07:00
parent a728bcf886
commit 5a77bd8332

View file

@ -12,7 +12,7 @@ type SetLabels = {
}
export async function setLabelsMutation(
linkId: string,
pageId: string,
labelIds: string[]
): Promise<Label[] | undefined> {
const mutation = gql`
@ -32,7 +32,7 @@ export async function setLabelsMutation(
`
try {
const data = await gqlFetcher(mutation, { input: { linkId, labelIds } }) as SetLabelsResult
const data = await gqlFetcher(mutation, { input: { pageId, labelIds } }) as SetLabelsResult
return data.errorCodes ? undefined : data.setLabels.labels
} catch (error) {
console.log('SetLabelsOutput error', error)