Last active
April 14, 2017 03:46
-
-
Save SachaG/8c69837ce5c97a3fe02087f18ad1f211 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { graphql } from 'react-apollo'; | |
import gql from 'graphql-tag'; | |
class MyComponent extends Component { ... } | |
const getMetaDataMutation = gql` | |
mutation getMetaData($url: String) { | |
getMetaData(url: $url) { | |
thumbnailUrl | |
viewCount | |
tweetCount | |
} | |
} | |
`; | |
const MyComponentWithMutation = graphql(getMetaDataMutation)(MyComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment