import React from 'react'; import { Mutation } from 'react-apollo'; import gql from 'graphql-tag'; const ADD_TO_CART_MUTATION = gql` mutation addToCart($id: ID!) { addToCart(id: $id) { id quantity } } `; class AddToCart extends React.Component { render() { const { id } = this.props; return ( {addToCart => } ); } } export default AddToCart;