Crowdhound connects dog owners with local people that would love the opportunity to chill with a dog for an afternoon or a few days, without having the responsibility 24/7/365.
Add createPhoto mutation, which uploads a photo to AWS and saves its URL to the database (if the request is for the current user or the current user's dog and the file is a valid image file.
Add PhotoTypeInput
Add BaseMutation#boot_unauthorized_user
Add file to the GraphQL context (from the file query parameter)
Add a caption attribute to the photos table and PhotoType
Add test fixtures of a real photo and an audio file
Turns VCR off for requests to AWS (because the filename is going to change for every request)
Resolves #64, related to user stories #57 & #59
The following checks have been completed:
[x] Tested my new feature(s) as well as any feasible edge cases (if possible)
[x] Checked coverage/index.html - did not add any new code that's not covered by testing (if possible)
[x] Merged in the latest master to my branch with git pull origin master & resolved merge conflicts
[x] Ran rails db:migrate
[x] Ran the test suite - all tests are passing (or maybe skipped)
[x] Checked affected endpoints in Postman / GraphiQL
[x] Updated README for changes (new endpoints, new gems, etc)
Notes:
Includes a DB migration -- you'll have to run it on your machine
Changes proposed in this pull request:
createPhoto
mutation, which uploads a photo to AWS and saves its URL to the database (if the request is for the current user or the current user's dog and the file is a valid image file.PhotoTypeInput
BaseMutation#boot_unauthorized_user
file
to the GraphQL context (from thefile
query parameter)caption
attribute to thephotos
table andPhotoType
Resolves #64, related to user stories #57 & #59
The following checks have been completed:
coverage/index.html
- did not add any new code that's not covered by testing (if possible)git pull origin master
& resolved merge conflictsrails db:migrate
Notes: