π₯ Heat Check π₯ is an app that helps spicy food lovers to explore restaurants that have an appropriate spice level to match. It allows users to search for restaurants with spicy dishes, add new dishes, review them, and rate their spiciness level.
π₯ Check out the front-end repo here
π₯ Visit our application website here
The following endpoints are exposed, and all endpoints begin with this base URL: https://heatcheck-be.herokuapp.com/ , and all Graphql endpoints respond to POST /graphql requests only. Query information will need to be sent in the body of the request.
query Restaurants($location: String! ) {
restaurants(location: $location) {
id
name
rating
address
lat
lon
city
}
}
query Restaurant($yelp_id: String! ) {
restaurant(id: $yelp_id) {
id
name
rating
price
imageUrl
url
categories
address
phone
lat
lon
city
dishes {
id
name
cuisineType
yelpId
spiceRating
}
}
}
query {
users {
id
email
username
}
}
query User($id: String! ) {
user(id: $id) {
id
email
username
}
}
query User($id: String! ) {
user(id: $id) {
id
email
username
reviews {
id
description
overallRating
userId
dishId
}
}
}
query {
dishes {
id
name
cuisineType
yelpId
spiceRating
}
}
query Dish($id: String! ) {
user(id: $id) {
id
name
cuisineType
yelpId
spiceRating
}
}
query Dish($id: String! ) {
dish(id: $id) {
id
name
cuisineType
yelpId
spiceRating
reviews {
id
description
overallRating
userId
dishId
}
}
}
query {
reviews {
id
description
overallRating
userId
dishId
}
}
query Review($id: String! ) {
user(id: $id) {
id
description
overallRating
userId
dishId
}
}
mutation {
user: createUser(
input: {
email: "hello@hello.com"
username: "hello"
}
) {
email
username
}
}
mutation {
user: updateUser(
input: {
id: "$id"
username: "superphil"
email: "phil@phil.com"
}
) {
username
email
}
}
mutation {
user: deleteUser(
input: {
id: "$id"
}
) {
id
}
}
mutation {
dish: createDish(
input: {
name: "Pad Thai"
cuisineType: "Thai"
yelpId: "123"
spiceRating: 2
}
) {
name
cuisineType
yelpId
spiceRating
}
}
mutation {
dish: updateDish(
input: {
id: "$id"
name: "Super Spicy Pad Thai"
cuisineType: "Thai"
yelpId: "1"
spiceRating: 9
}
) {
id
name
cuisineType
yelpId
spiceRating
}
}
mutation {
dish: deleteDish(
input: {
id: "$id"
}
) {
id
}
}
mutation {
review: createReview(
input: {
description: "yummers"
overallRating: 4
userId: "$user_id"
dishId: "$dish_id"
}
) {
description
overallRating
userId
dishId
}
}
mutation {
review: updateReview(
input: {
description: "eh, actually its not great"
overallRating: 2
id: "$id"
}
) {
description
overallRating
id
}
}
mutation {
review: deleteReview(
input: {
id: "$id"
}
) {
id
}
}
Example of a graphql call to BE that will pull up a restaurant, its dishes, and all associates reviews all at once:
{
restaurant(id: "OT6MJNr8Gzd9nyf25dEl6g") {
id
name
rating
price
imageUrl
url
categories
address
phone
lat
lon
city
dishes {
id
name
cuisineType
yelpId
spiceRating
reviews {
id
description
overallRating
userId
dishId
}
}
}
}
{ hottestDishes(amt: -number-) {
id
name
cuisineType
yelpId
spiceRating
}
} (
- Fork and clone the repo to your local machine with SSH:
git clone git@github.com:HeatChecc/Heat-Check-BE.git
2 .Register for external API keys:
- Install gems and dependencies:
bundle install
- Configure API keys by running
bundle exec figaro install
and then adding keys toapplication.yml
file:
- yelp_token: your_key_here
- Set up database:
rails db:{drop,create,migrate,seed}
- Run test suite:
bundle exec rspec
- Start up your local server:
rails s
- Visit the endpoint url
http://localhost:3000/graphiql
to consume the API locally.
πΆ Phillip Stewart πΆ
πΆ Eli Sachs πΆ
πΆ Gauri Joshi πΆ
πΆ Ethan Nguyen πΆ
πΆ David Daw πΆ
πΆ Ivy Nguyen πΆ
πΆ Cleveland Ticoalu πΆ