This is a parody of 6 Degrees of Kevin Bacon using the Marvel universe with Squirrel Girl as our "Kevin Bacon". It was intended to explore MarvelQL by Novvum but ended up relying mostly on the original Marvel REST API.
This project was created for my GraphQSquirrel talk at elm-conf 2019. You can find the slides and recording listed in my presentations repo.
-
Sign up for an account through the Marvel developer portal.
-
At the root of the project, run
cp src/Secrets.elm.template src/Secrets.elm
to duplicate the Secrets template file. -
Open
src/Secrets.elm
and fill in your private and public api keys found in your account details. This Secrets.elm file is ignored in the .gitignore so no worries.
Make sure you've first followed Setting up your api keys.
-
If you don't already have elm installed, follow the install instructions from the elm-lang guide.
-
Install dependencies through
npm install
. -
Generate the GraphQL client by running
npm run api:gen
from the root of the project. -
Run
elm reactor
. -
Navigate to
http://localhost:8000/src/Main.elm
to see the app running! Have fun!
This project doesn't have enough tests because I was lazy but there are some tests!
-
Install elm-explorations/test globally by running
npm install -g elm-test
-
Run
elm-test
ornpm run test
.
- Currently does not deal with paginating through API responses--would also require rethinking of when a degree has been completely searched since I currently use an empty PendingComics queue to mean it's time to step to the next degree
- Currently does not correctly fill in the working graph from the cache past the first degree--only fills in the first degree and thinks it is done. Probably need to just reload PendingComics appropriately but the first degree is handled by one function and the rest of the degrees are handled by another function (since one is from /comics and the other is from /comics/#{id}/character)
-
Find Squirrel Girl at your local comic book store.
-
Find Squirrel Girl Vol 1 at your local indie bookstore.
-
Find Squirrel Girl Vol 1 at your local public library--also remember that it is the 21st centruy and most libraries have a way to digitially checkout comics! Check with your local library!