Skip to content

Instantly share code, notes, and snippets.

View jbaxleyiii's full-sized avatar
💼
Moved to management

James Baxley jbaxleyiii

💼
Moved to management
View GitHub Profile
{
"aggregate": {
"timestamp": "2018-03-07T15:29:42.986Z",
"scenariosCreated": 1200,
"scenariosCompleted": 1200,
"requestsCompleted": 1200,
"latency": {
"min": 4,
"max": 136.5,
"median": 5.3,
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudformation:List*",
"cloudformation:Get*",
"cloudformation:PreviewStackUpdate"
],
const query = gql`
query FetchWhatMyAppNeeds {
# run 1
tasks {
id
details {
date
title
# run 2
header @client # virutal field (date + title)
/*
the extends function takes a base class and returns a function
that can be extended into a new class given methods
the methods must be in the form of [
{ key: "methodName": value: function }
]
this is pulled from babel => es5 of a class extend
const MOVIE_QUERY = gql`
query GetMovie($id: Int!) {
movie(id: $id) {
id
title
overview
poster_path
}
}
`;
import React, {Fragment} from 'react';
import ReactDOM from 'react-dom';
import {createElement} from 'glamor/react';
import {createResource} from 'simple-cache-provider';
import {ApolloProvider, Query} from 'react-apollo';
import ApolloClient, {gql} from 'apollo-boost';
/* @jsx createElement */
import withCache from './withCache';
const path = require("path");
module.exports = {
entry: ["./index.js"],
output: {
path: path.resolve(__dirname, "dist"),
filename: "./server.js",
},
externals: [
function(context, request, callback) {
import gql from 'graphql-tag';
import { Query } from 'react-apollo';
const query = gql`
query SomeQuery {
foo {
bar
baz
}
}
open Sql;
let model =
define(
~table="users",
~fields=[("id", UUID), ("firstName", String), ("lastName", String), ("email", String)]
);
Sql.findById(model, 123)
|> Js.Promise.then_(
{
"data": {
"__schema": {
"queryType": {
"name": "Query"
},
"mutationType": {
"name": "Mutation"
},
"subscriptionType": null,