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 Constants = { | |
| SECRET: 'iloveyou' | |
| } | |
| export default Constants |
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 express from 'express'; | |
| import { graphqlExpress, graphiqlExpress } from 'apollo-server-express'; | |
| import bodyParser from 'body-parser'; | |
| import schema from './data/schema'; | |
| import cors from 'cors'; | |
| import jwt from 'express-jwt'; | |
| import Constants from './constants'; | |
| import { User } from './data/connectors'; | |
| const GRAPHQL_PORT = 4000; |
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 { | |
| makeExecutableSchema, | |
| addMockFunctionsToSchema, | |
| } from 'graphql-tools'; | |
| import resolvers from './resolvers'; | |
| const typeDefs = ` | |
| type User { | |
| id: Int |
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 { User } from './connectors'; | |
| import bcrypt from 'bcrypt'; | |
| import jwt from 'jsonwebtoken'; | |
| import Constants from '../constants'; | |
| const resolvers = { | |
| Query: { | |
| user(_, args) { | |
| return User.find({ where: args }); | |
| }, |
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 Sequelize from 'sequelize'; | |
| import casual from 'casual'; | |
| import _ from 'lodash'; | |
| import bcrypt from 'bcrypt'; | |
| const password = "test123" | |
| const db = new Sequelize('blog', null, null, { | |
| dialect: 'sqlite', | |
| storage: './blog.sqlite', | |
| }); |
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 React, { Component } from 'react'; | |
| import { | |
| AppRegistry, | |
| StyleSheet, | |
| Text, | |
| View, | |
| TouchableOpacity, | |
| Button | |
| } from 'react-native'; | |
| import Modal from 'react-native-modal' |
NewerOlder