By
const type = `
type User {
id: Int!
email: String
courses: [Course]
}
// tools.generateId | |
function generateId(size){ | |
var text = []; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for( var i=0; i < size; i++ ) | |
text.push(possible.charAt(Math.floor(Math.random() * possible.length))); | |
return text.join(''); | |
} |
import 'isomorphic-fetch' | |
import { getDataFromTree, ApolloProvider } from 'react-apollo/lib/index' | |
import { ApolloClient, createNetworkInterface } from 'apollo-client' | |
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; | |
import { omit } from 'lodash' | |
const isServer = (typeof window === 'undefined') | |
const makeClient = () => new ApolloClient({ | |
ssrMode: true, |
const axios = require("axios"); | |
const R = require("ramda"); | |
module.exports = async (latitude = 0, longitude = 0) => { | |
const { data } = await axios.get("https://api.foursquare.com/v2/venues/explore", { | |
params: { | |
client_id: process.env.FOURSQUARE_CLIENT_ID, | |
client_secret: process.env.FOURSQUARE_CLIENT_SECRET, | |
v: 20180707, | |
section: "coffee", |
import { createServer, Server } from 'http'; | |
import { test as base } from '@playwright/test'; | |
import path from 'path'; | |
import serve from 'serve-handler'; | |
type StaticWorkerFixtures = { | |
port: number; | |
server: Server; | |
}; |