apollo-mobx
apollo-mobx copied to clipboard
BUG: HoC does not work with mutations
If I try to use the grapqhl
hoc with a mutation my app crashes upon initialization with
Uncaught (in promise) Error: Must contain a query definition.
For example:
const createOrgGroupMutation = gql`
mutation createOrgGroup ($name: String!) {
createOrgGroup(name: $name) {
id
}
}
`;
export default graphql(createOrgGroupMutation)(CreateOrgGroupDialog);
If I use the graphql hoc from react-apollo this error does not occur.
Yeah, that is not implemented. I use mutations differently using the "mutation" construct from this package. As I have usually 4-5 mutations per component that seemed to be a better option. Once I'll have a bit of time I'll look into this.
@tomitrescak which mutation construct are you referring to? could you perhaps create an example? thanks