- Create new account
- Upvote a post
- Downvote a post
# Front-End | |
preact | |
mithril | |
inferno | |
elm | |
skate | |
cycle | |
avalon | |
sencha |
React | |
Angular | |
"Angular 2" | |
Ember | |
Vue | |
Backbone | |
Polymer | |
Aurelia | |
"No Front-End Framework" | |
"Other Front-End Frameworks" |
This package helps you process charges with Vulcan. It currently only supports Stripe, but other payment processors may be supported in the future (PRs welcome!).
This package does the following things:
query postsListQuery($terms: JSON) { | |
postsTotal(terms: $terms) | |
postsList(terms: $terms) { | |
__typename | |
...PostsList | |
} | |
} | |
fragment PostsList on Post { |
export default function withMutation({name, args}) { | |
let mutation; | |
if (args) { | |
const args1 = _.map(args, (type, name) => `$${name}: ${type}`); // e.g. $url: String | |
const args2 = _.map(args, (type, name) => `${name}: $${name}`); // e.g. $url: url | |
mutation = ` | |
mutation ${name}(${args1}) { | |
${name}(${args2}) |
let mutation; | |
if (args) { | |
const args1 = _.map(args, (type, name) => `$${name}: ${type}`); // e.g. $url: String | |
const args2 = _.map(args, (type, name) => `${name}: $${name}`); // e.g. $url: url | |
mutation = ` | |
mutation ${name}(${args1}) { | |
${name}(${args2}) | |
} | |
` |
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 |
export default function withGetMetaDataMutation(component) { | |
return graphql(gql` | |
mutation getMetaData($url: String) { | |
getMetaData(url: $url) { | |
thumbnailUrl | |
viewCount | |
tweetCount | |
} | |
} | |
`, { |
import { graphql } from 'react-apollo'; | |
import gql from 'graphql-tag'; | |
export default function withGetMetaDataMutation(component) { | |
return graphql(gql` | |
mutation getMetaData($url: String) { | |
getMetaData(url: $url) { | |
thumbnailUrl | |
viewCount | |
tweetCount |