Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e4d7fd0
article models
richiethie Feb 14, 2023
cd56ecf
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
ddwk21 Feb 14, 2023
ca282aa
adds style components
JeremyBukofzer Feb 14, 2023
2f4e533
updated models
richiethie Feb 14, 2023
10038a4
Merge branch 'main' of https://github.com/ddwk21/cyclone into richie-db
richiethie Feb 14, 2023
4e51332
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
richiethie Feb 14, 2023
667f674
Working to get google authentication working for signup/login
Hunter-Mayer Feb 14, 2023
7fa02c6
added start of seed script
ddwk21 Feb 15, 2023
29e1100
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
ddwk21 Feb 15, 2023
3996a9c
addArticle mutation
richiethie Feb 16, 2023
de7beb1
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
richiethie Feb 16, 2023
acabe6c
added placeholder divs for home articles
Krenbot Feb 16, 2023
19dae81
Mitch commit. Seeds finished, working on feed logic, about half done
ddwk21 Feb 16, 2023
31d112a
Working seeds, feed logic half finished
ddwk21 Feb 16, 2023
02f4f8b
Got burger menu working
Hunter-Mayer Feb 16, 2023
cb2051f
got rid of header navigation elements in place of burger menu
Hunter-Mayer Feb 16, 2023
9aa3ae5
prototype article div centered and finished
Krenbot Feb 16, 2023
304df6a
some formatting css to make it look cleaner
Hunter-Mayer Feb 16, 2023
fa66a1e
minor div formatting
Krenbot Feb 16, 2023
e2df0c4
deleted article component for ease of merge w/ main
Krenbot Feb 16, 2023
e3d1163
adds article layout example
JeremyBukofzer Feb 16, 2023
6e21ae3
Merge branch 'sk-routes' into jeremy-design
JeremyBukofzer Feb 16, 2023
8614257
Merge pull request #1 from ddwk21/jeremy-design
JeremyBukofzer Feb 16, 2023
58f6716
added resolver mutations
richiethie Feb 16, 2023
7d676f3
added resolver mutations
richiethie Feb 16, 2023
5b78dcb
Typedefs fixed, resolvers fixed, seeds fixed, database structure siml…
ddwk21 Feb 16, 2023
6202167
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
ddwk21 Feb 16, 2023
5661aaa
addArticle deleteArticle
richiethie Feb 17, 2023
944ffcf
mitch commit
ddwk21 Feb 17, 2023
0204419
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
ddwk21 Feb 17, 2023
c14a3f6
Mitch's working seeds
ddwk21 Feb 17, 2023
98d8d34
test
richiethie Feb 17, 2023
eaad523
updated branch
richiethie Feb 17, 2023
cdd76c2
update day commit
JeremyBukofzer Feb 17, 2023
9de36a3
fixed seeds script
richiethie Feb 17, 2023
be4bb30
front end env
richiethie Feb 17, 2023
f7e2a50
added eslintcache to gitignore
Hunter-Mayer Feb 17, 2023
8cbb176
merging
Hunter-Mayer Feb 17, 2023
fe08179
reduced post content/body padding
Krenbot Feb 17, 2023
0b8ade8
fixes burger placement
JeremyBukofzer Feb 17, 2023
64b578b
fixes burger menu default position
JeremyBukofzer Feb 17, 2023
07bea16
adjusts margins and font sizes for articles
JeremyBukofzer Feb 19, 2023
e84db73
shows logo in mobile
JeremyBukofzer Feb 20, 2023
e24a993
post merge from jeremy-design
Krenbot Feb 21, 2023
c60b3b4
fixed componentns/app.css error formatting
Krenbot Feb 21, 2023
fecd28f
scrollbar styles applied
Krenbot Feb 21, 2023
ccffe0a
finished scrollbar stylings
Krenbot Feb 21, 2023
10bb5cf
fetching random ID and xml parsing logic
ddwk21 Feb 21, 2023
c4765c0
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
ddwk21 Feb 21, 2023
03e8c3d
XML parser and random article id fetching middleware
ddwk21 Feb 21, 2023
ce8f6e2
Merge pull request #5 from ddwk21/sk-design
richiethie Feb 21, 2023
d485c43
added server gitignore
Krenbot Feb 21, 2023
5314c32
Delete server/node_modules directory
richiethie Feb 21, 2023
41e5f5a
added git ignore to node modules
Krenbot Feb 21, 2023
e521de0
server/node_modules tracking test
Krenbot Feb 21, 2023
8ef3ab2
Gitignore
ddwk21 Feb 21, 2023
82af7f6
Merge branch 'richie-db' of https://github.com/ddwk21/cyclone into ri…
ddwk21 Feb 21, 2023
3840962
node module untrack test
Krenbot Feb 21, 2023
d642325
updated gitignore
ddwk21 Feb 21, 2023
46509a8
deleted package-lock
ddwk21 Feb 21, 2023
e84435d
untracked nodemodules & package-lock.json
Krenbot Feb 21, 2023
06ffac7
Merge branch 'dev' into richie-db
richiethie Feb 21, 2023
f7b2022
Merge pull request #7 from ddwk21/richie-db
richiethie Feb 21, 2023
1e63393
Fixed comma and redundant json
ddwk21 Feb 21, 2023
3a8e43e
added missing comma in root package json
Krenbot Feb 21, 2023
a4e6990
cleaned package json redundancies
Krenbot Feb 21, 2023
e3947be
Updated feed logic
ddwk21 Feb 21, 2023
f498132
fixed typo line 19
Krenbot Feb 21, 2023
0e6fdc7
changed feedgen to return text
ddwk21 Feb 21, 2023
c89f8d0
pulled additional feedMe functionality
Krenbot Feb 21, 2023
3239f46
Fixed target for random article middleware
ddwk21 Feb 21, 2023
4187d96
Merge branch 'dev' of https://github.com/ddwk21/cyclone into dev
ddwk21 Feb 21, 2023
5c70d72
Feedme converted to object called Feeder
ddwk21 Feb 21, 2023
5e7dd2a
push to pull
Krenbot Feb 21, 2023
9e2c6c4
Merge branch 'dev' of https://github.com/ddwk21/cyclone into richie-db
ddwk21 Feb 21, 2023
ddeb1e4
added prototype use effect for feed data
Krenbot Feb 21, 2023
1b67313
randomArticle functionality done
Krenbot Feb 21, 2023
cc528db
env key functionality finished
Krenbot Feb 21, 2023
6c0aa04
added todo to readme
Krenbot Feb 21, 2023
42cc3bb
use effect adjustments
Krenbot Feb 21, 2023
35fb3ee
Merge branch 'dev' of https://github.com/ddwk21/cyclone into dev
ddwk21 Feb 22, 2023
44d4bed
push to pull
Krenbot Feb 22, 2023
58489e5
Merge branch 'dev' of https://github.com/ddwk21/cyclone into dev
Krenbot Feb 22, 2023
73c991f
Image sorting dialed in, returning text. Title is duplicated in text,…
ddwk21 Feb 22, 2023
91e7b75
Working image array and text blockgit add .!
ddwk21 Feb 22, 2023
2f4efe5
Merge branch 'dev' of https://github.com/ddwk21/cyclone into dev
Krenbot Feb 23, 2023
c3ff385
added and formatted heart button
Krenbot Feb 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
/node_modules
/.pnp
.pnp.js
package-lock.json


# testing
/coverage
Expand All @@ -18,7 +20,7 @@
.env.development.local
.env.test.local
.env.production.local

package-lock.json
npm-debug.log*
yarn-debug.log*
yarn-error.log*
28 changes: 1 addition & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,2 @@
# Pass JWT to Resolver with Context (Server-side)

In this demo, you will verify if a token is valid and carry

## Instructions

* Run `npm install` and `npm run seed` to set up the database.

* Open [server.js](server/server.js) and explain the following:

* We can add another option to our Apollo Server configuration called `context`, which is a lot like middleware in Express.

* This will allow us to intercept any request to the server and check if there's a valid JWT before the request gets to the resolver.

* Open [auth.js](server/utils/auth.js) and explain the `authMiddleware` function:

* Whenever we make a request to our server, we will check if there's a token with the request and attempt to verify and decode it if there is.

* We use the `return` statement to return the `req` object, either modified with user data or not modified at all, and the request will continue to go to its intended resolver function.

* Open [resolvers.js](server/schemas/resolvers.js) and explain the following:

* Any time we need to implement authentication on a query or mutation, we can add a third parameter called `context` to the resolver function.

* The `context` object is whatever has been returned from our `authMiddleware` function, so it may or may not include a `user` property depending on the status of the JSON Web Token.

* If there is a `user` property, we can assume the user's token has been verified and the `user` property now holds data about the user that we stored in the token itself.

TODO: Add ENV files from server/client to heroku
1 change: 1 addition & 0 deletions client/.eslintcache

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
package-lock.json

# testing
/coverage
Expand All @@ -17,7 +18,11 @@
.env.development.local
.env.test.local
.env.production.local
.eslintcache


npm-debug.log*
yarn-debug.log*
yarn-error.log*

.eslintcache
Loading