Skip to content

Instantly share code, notes, and snippets.

import NotificationsQuery from "apollo/NotificationsQuery.graphql";
import { apolloDataType } from './helpers';
NotificationContainer.propTypes = {
data: apolloDataType(NotificationsQuery).isRequired,
};
export default const EnhancedNotificationContainer = graphql(
NotificationsQuery
)(NotificationContainer);
import { check } from 'graphql-anywhere';
function PropTypeError(message) {
this.message = message;
this.stack = '';
}
// Make `instanceof Error` still work for returned errors.
PropTypeError.prototype = Error.prototype;
export const apolloDataType = apolloObject => {
const _initialState = Immutable.fromJS({
isLoading: false,
user: null,
});
@ShockiTV
ShockiTV / gist:12ef7a250a8669c1b00f
Last active February 17, 2016 17:14
how I would try to generate array field count on the fly
'arrayFieldName': {
...
autoform: {
afArrayField: {
options: function () {
const count = calculateCount();
return {
initialCount: count
}
}
Roberts-MacBook-Pro:polycordova shock$ cat polycordova.html
<head>
<title>polycordova</title>
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="bower_components/paper-checkbox/paper-checkbox.html">
</head>
<body>
<paper-checkbox></paper-checkbox>
<h1>Welcome to Meteor!</h1>
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
@ShockiTV
ShockiTV / designer.html
Last active August 29, 2015 14:21
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">
@ShockiTV
ShockiTV / designer.html
Last active August 29, 2015 14:21
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-radio-group/paper-radio-group.html">