Skip to content

Instantly share code, notes, and snippets.

@michalchudziak
Created November 1, 2016 14:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michalchudziak/8c8f81eb06da4ca0e5878146cce4677e to your computer and use it in GitHub Desktop.
Save michalchudziak/8c8f81eb06da4ca0e5878146cce4677e to your computer and use it in GitHub Desktop.
const ComponentWithSavePost = graphql(savePostMutation, {
props: ({ mutate }) => ({
savePost: (title, body) => mutate({ variables: { title, body } }),
}),
})(Component);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment