Skip to content

Instantly share code, notes, and snippets.

@EricMcRay
EricMcRay / README.md
Last active January 18, 2019 10:49
Missing type in fragment matcher json

What I have done

I download schema.json from server with apollo-tooling cli and give it to apollo cache with fragment matcher. That time server did not have CommentNotification type, just LikeNotification type which implements Notification interface.

I have notification components in react-native for LikeNotification type and Notification interface. I put a switch case which fallbacks unknown notifications which implements Notification interface to default notifications component.

My issue with Apollo client

My react-native app which is in app store right now has old version of schema.json and It dont know CommentNotification implements Notification interface and apollo client returns a empty object just with typename.

@EricMcRay
EricMcRay / cobined-calendar.vue
Last active March 30, 2018 08:01
vcalendar combined multiple calendar
<script lang="ts">
import { Vue, Component, Prop, Emit, Watch } from 'vue-property-decorator';
import moment from 'moment';
import { CreateElement } from 'vue/types/vue';
type Page = {
month: number;
year: number;
};
/* jshint devel:true */
L.mapbox.accessToken = '*************************';
var id = 1;
var map = L.mapbox.map('map', 'mapbox.dc-markers');
var markers = [];
var currentIndex;
// Open popup when user mouses over a marker
map.featureLayer.on('ready', function(e) {
var postModel = require('../models/postModel');
var mysql = require('mysql');
// getAall called by routes.js file
app.get('/posts/:username/', [authentication.check, posts.getAll]);
//
exports.getAll = function(req, res){
postModel.findByUsername(req.params.username, function(err, results){
if(results.length === 0) {