Skip to content

Instantly share code, notes, and snippets.

@peterj
Last active December 29, 2017 18:22
Show Gist options
  • Save peterj/7232af468b4c62d5af6826760d2f8dc0 to your computer and use it in GitHub Desktop.
Save peterj/7232af468b4c62d5af6826760d2f8dc0 to your computer and use it in GitHub Desktop.
import gql from 'graphql-tag';
import { graphql } from 'react-apollo';
const CREATE_SHORT_LINK_MUTATION = gql`
mutation CreateLinkMutation($url: String!, $description: String!, $hash: String!) {
createLink(url: $url, description: $description, hash: $hash) {
id
}
}
`;
// CreateShortLink component code omitted
export default graphql(CREATE_SHORT_LINK_MUTATION, {
name: 'createShortLinkMutation',
})(CreateShortLink);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment