UNPKG

pubsweet-component-wax

Version:

PubSweet component for the Wax collaborative document editor

27 lines (22 loc) 630 B
import React from 'react' import { Mutation } from '@apollo/react-components' import gql from 'graphql-tag' const UPDATE_BOOK_COMPONENT_CONTENT = gql` mutation UpdateBookComponentContent($input: UpdateBookComponentInput!) { updateContent(input: $input) { id content } } ` const updateBookComponentContentMutation = props => { const { render } = props return ( <Mutation mutation={UPDATE_BOOK_COMPONENT_CONTENT}> {(updateContent, updateContentResult) => render({ updateContent, updateContentResult }) } </Mutation> ) } export default updateBookComponentContentMutation