From 3b42102026a00a290bfff5a4c9bd3eb8452ef97d Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Tue, 15 May 2018 16:03:58 -0400 Subject: what --- backend/README.md | 33 ++++----------------------------- backend/src/resolvers/Query.js | 1 - frontend/pages/_app.js | 1 - frontend/pages/add.js | 13 +++++++++++++ frontend/pages/index.js | 1 - 5 files changed, 17 insertions(+), 32 deletions(-) create mode 100644 frontend/pages/add.js diff --git a/backend/README.md b/backend/README.md index 56c5b9c..cce3c38 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,32 +1,7 @@ -What are all these files?! - -What are the steps: - - -When you want to add a new function: - -1. Open your `schema.graphql` and add it to the mutatiions -2. Add a mutation resolver to match that new mutation: - - ``` - addToCart(parent, args, ctx, info) { - console.log('ADding an item to cart!'); - }, - ``` -3. Create a client-side Mutation that will accept the arguments and call it - - -### Installing Docker - -1. download docker -1. run `prisma local start` -1. Run `prisma deploy` - -if in trouble, run `prisma local nuke` - - - +what + + diff --git a/backend/src/resolvers/Query.js b/backend/src/resolvers/Query.js index 0cec090..276f7fa 100644 --- a/backend/src/resolvers/Query.js +++ b/backend/src/resolvers/Query.js @@ -4,7 +4,6 @@ const { forwardTo } = require('prisma-binding'); const Query = { items(parent, args, ctx, info) { - console.log(args); return ctx.db.query.items({ ...args }, info); }, diff --git a/frontend/pages/_app.js b/frontend/pages/_app.js index ccbc3ae..d2e6908 100644 --- a/frontend/pages/_app.js +++ b/frontend/pages/_app.js @@ -9,7 +9,6 @@ import { CURRENT_USER_QUERY } from '../queries/queries.graphql'; class MyApp extends ApolloApp { componentDidMount() { if (typeof window !== 'undefined' && !window.__CLIENTLOADED__) { - console.log('Refetching current user'); this.props.apollo.query({ query: CURRENT_USER_QUERY, fetchPolicy: 'network-only' }); window.__CLIENTLOADED__ = true; } diff --git a/frontend/pages/add.js b/frontend/pages/add.js new file mode 100644 index 0000000..92d0c18 --- /dev/null +++ b/frontend/pages/add.js @@ -0,0 +1,13 @@ +import Page from '../components/Page'; +import CreateItem from '../components/CreateItem'; +import PleaseSignIn from '../components/PleaseSignIn'; + +const Sell = () => ( + + + + + +); + +export default Sell; diff --git a/frontend/pages/index.js b/frontend/pages/index.js index 1dca5e1..49ec864 100644 --- a/frontend/pages/index.js +++ b/frontend/pages/index.js @@ -6,7 +6,6 @@ import Page from '../components/Page'; class Home extends React.Component { render() { const page = parseInt(this.props.query.page) || 1; - console.log(this.props); return ( -- cgit v1.3