我正在尝试以这种格式创建两个单独的突变:
import gql from 'graphql-tag';
const MUTATION = gql`
mutation setItem($item:String!) {
setItem(item:$item)
},
mutation setAnotherItem($setAnotherItem:Bool) {
setAnotherItem(setAnotherItem:$setAnotherItem)
}
`;
但我收到此错误:
Invariant Violation: react-apollo only supports a query, subscription, or a mutation per HOC. [object Object] had 0 queries, 0 subscriptions and 2 mutations. You can use 'compose' to join multiple operation types to a component
什么是构造它以使两个突变都可用的正确方法?