Skip to content

Instantly share code, notes, and snippets.

View callmephilip's full-sized avatar

Philip Nuzhnyi callmephilip

View GitHub Profile
fastlane_version "1.100.0"
default_platform :ios
platform :ios do
desc "Runs all the tests"
lane :test do
scan
end
# this must point to the private repository you are gonna use for storing certificates
git_url "git+ssh://git@github.com/callmephilip/todos-certs.git"
type "development"
app_identifier "io.thebakery.todos"
username "developers@thebakery.io"
const RootQuery = {
type: new GraphQLList(TodoSchemaType),
resolve: (_, { text }, { Query, user }) => {
const query = new Query(Todo);
return query.find();
}
};
import express from 'express';
import parseGraphQLHTTP from 'parse-graphql-server';
const app = express();
app.use('/graphql', parseGraphQLHTTP({ schema, graphiql: true, }));
app.listen(process.env.PORT, () => {
console.log('server running');
});
import GraphQLClient from 'parse-graphql-client';
const client = new GraphQLClient(settings.graphqlURL, require('parse/react-native'));
client.query(`
{
todos {
id, text, isComplete
}
}
const RootQuery = {
type: new GraphQLList(TodoSchemaType),
resolve: (_, args, sessionToken) => {
const query = new Parse.Query(Todo);
return query.find({ sessionToken });
}
};
import graphqlHTTP from 'express-graphql';
const app = express();
app.use('/graphql', graphqlHTTP(function(request) {
return {
schema: MyGraphQLSchema,
graphiql: true,
context: sessionToken: request.headers && request.headers.authorization
};
const query = new Parse.Query(Todo);
return query.find({ sessionToken });
import { View, Platform } from 'react-native';
import React, { Component } from 'react';
import styles from './styles';
import MainNavigation from '../MainNavigation';
import AddTodoItem from '../AddTodoItem';
class App extends Component {
render() {
return (
<View style={ styles.container }>
class MainNavigation extends Component {
render() {
const children = this.props.mainNavigation.children.map( (tab, i) => {
return (
<TabBarIOS.Item key={tab.key}
icon={tab.icon}
selectedIcon={tab.selectedIcon}
title={tab.title} onPress={
() => this.props.onNavigate(JumpToAction(i))
}