diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-05-15 16:03:58 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-05-15 16:03:58 -0400 |
| commit | 3b42102026a00a290bfff5a4c9bd3eb8452ef97d (patch) | |
| tree | ae73997e78c546b0f02795e99f0312e0db265697 | |
| parent | a2f7c511badb6da1f1b7812ea4636ee82a9feb3d (diff) | |
what
| -rw-r--r-- | backend/README.md | 33 | ||||
| -rw-r--r-- | backend/src/resolvers/Query.js | 1 | ||||
| -rw-r--r-- | frontend/pages/_app.js | 1 | ||||
| -rw-r--r-- | frontend/pages/add.js | 13 | ||||
| -rw-r--r-- | frontend/pages/index.js | 1 |
5 files changed, 17 insertions, 32 deletions
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 +<!-- ### Cloudinary 1. go to your settings and turn on unsigned uploading -2. +2. --> + 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 = () => ( + <Page> + <PleaseSignIn> + <CreateItem /> + </PleaseSignIn> + </Page> +); + +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 ( <Page> <Items page={page} /> |
