remove last commit, keep the code changes git reset --soft HEAD~1
This file contains 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 typeDefsWithAccounts = [typeDefs, accountsGraphQL.typeDefs]; | |
const resolvers = merge(accountsGraphQL.resolvers, CustomResolvers); | |
// Give apollo server it's options object | |
const server = new ApolloServer({ | |
resolvers, | |
typeDefs: typeDefsWithAccounts, | |
context: async req => { | |
let result = await accountsGraphQL.context(req); |
This file contains 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 from 'react'; | |
import styled from 'styled-components'; | |
import DocumentTitle from 'react-document-title'; | |
import constants from 'lib/constants'; | |
import VendorsSearch from './VendorsSearch'; | |
import queryString from 'query-string'; | |
const PageContainer = styled.div` | |
width: 1200px; | |
margin: auto; |
This file contains 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
// TOP LEVEL IMPORTS | |
import React from 'react'; | |
import { Route, Redirect } from 'react-router-dom'; | |
class ProtectedRoute extends React.Component { | |
render() { | |
const { | |
currentUser, | |
path, | |
noNav, |
This file contains 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 from 'react'; | |
import styled from 'styled-components'; | |
import Header from './Header'; | |
// STYLE-COMPONENTS | |
// =================================== | |
const AuthenticatedLayout = styled.div` | |
min-height: 100vh; | |
height: 100%; | |
max-width: 100%; |
This file contains 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
<ProtectedRoute | |
exact | |
layout={AuthenticatedLayout} | |
currentUser={currentUser} | |
path="/app/search" | |
component={AppSearchRoute} | |
/> |
This file contains 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 Gigs from '../../../../collections/Gigs/model'; | |
const gigs = async (root, { params }, { user }) => { | |
try { | |
let gigs = []; | |
let count = 0; | |
if (!user || !user.id) return { gigs, count }; | |
let query = {}; |
This file contains 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 mongoose from 'mongoose'; | |
import dotenv from 'dotenv'; | |
// pulls in and sets our environment variables from a .env file | |
dotenv.config(); | |
// connect mongoose | |
mongoose.connect(process.env.MONGO_URL, { useNewUrlParser: true }); |
This file contains 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 AccountsPassword from '@accounts/password'; | |
import MongoDBInterface from '@accounts/mongo'; | |
import AccountsServer from '@accounts/server'; | |
import { AccountsModule } from '@accounts/graphql-api'; | |
import { db } from './src/modules/mongodb.js'; | |
const password = new AccountsPassword(); | |
const accountsServer = new AccountsServer( | |
{ | |
db: new MongoDBInterface(db), |
This file contains 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 Variant { | |
id: ID | |
name: String | |
possibleValues: [String] | |
sku: String | |
price: Int | |
cost: Int | |
barcode: String | |
number: String | |
} |