pubsweet-component-wax
Version:
PubSweet component for the Wax collaborative document editor
26 lines (21 loc) • 530 B
JavaScript
import React from 'react'
import { Mutation } from '@apollo/react-components'
import gql from 'graphql-tag'
const UPDATE_CUSTOM_TAG = gql`
mutation UpdateCustomTag($input: [CustomTagUpdateInput]!) {
updateCustomTag(input: $input) {
id
label
tagType
}
}
`
const updateCustomTagMutation = props => {
const { render } = props
return (
<Mutation mutation={UPDATE_CUSTOM_TAG}>
{updateCustomTag => render({ updateCustomTag })}
</Mutation>
)
}
export default updateCustomTagMutation