This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dashboard "Food": | |
- h1 text: Food | |
- h2 text: By caloric content | |
- 3 columns: | |
- rows: | |
- h3 text: Bananas | |
- pie chart: { | |
"columns": [ | |
["Protein", 5], ["Sugar", 10], ["Other carbs", 40], ["Fat", 1] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%RAML 1.0 | |
title: Booking Service | |
version: v1 | |
baseUri: / | |
types: | |
Booking: | |
properties: | |
city: string | |
cinema: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
signup = async () => { | |
const { email, password } = this.state; | |
try { | |
const result = await this.props.signupUserMutation({ | |
variables: { | |
email, | |
password, | |
}, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag'; | |
import { Query } from 'react-apollo'; | |
const query = gql` | |
query SomeQuery { | |
foo { | |
bar | |
baz | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { GraphQLServer } = require('graphql-yoga'); | |
let count = 2; | |
let todos = [{ | |
id: '0', | |
content: 'Buy milk', | |
isCompleted: true | |
}, | |
{ | |
id: '1', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_id" : "Rc3e0u89Ao", | |
"answer" : "If you require special assistance, auxiliary aids, or other reasonable accommodations to fully participate in this event, please email [email protected]. Information regarding disabilities and special assistance will remain confidential.", | |
"question" : "Are there accommodations for people with disabilities and those requiring special assistance?", | |
"_updated_at" : ISODate("2016-10-07T18:46:01.032+0000"), | |
"_created_at" : ISODate("2016-10-07T18:46:01.032+0000") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AsyncStorage } from 'react-native'; | |
// retrieve | |
export const retrieve = async (key) => await AsyncStorage.getItem(key); | |
// store | |
export const store = async (key, value) => { | |
await AsyncStorage.setItem(key, value); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const Mongoose = require('mongoose'); | |
const PORT = 8080; | |
const app = express(); | |
const { apolloExpress, graphiqlExpress } = require('apollo-server'); | |
const { makeExecutableSchema } = require('graphql-tools'); | |
Mongoose.Promise = global.Promise; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloClient, createNetworkInterface } from 'react-apollo'; | |
import { SubscriptionClient } from 'subscriptions-transport-ws'; | |
import { addGraphQLSubscriptions } from 'add-graphql-subscriptions'; | |
import { AsyncStorage } from 'react-native'; | |
import { SERVER_ENDPOINT, SERVER_SUBSCRIPTION_ENDPOINT } from 'env'; | |
let apolloClient = null; | |
const create = async (initialState = {}) => { | |
const token = await AsyncStorage.getItem('token'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type User { | |
id: ID! @unique | |
createdAt: DateTime! | |
updatedAt: DateTime! | |
firstName: String! | |
lastName: String! | |
email: String! @unique | |
password: String! | |
phone: String! | |
responseRate: Float |