Skip to content

BenSymons/BE-Mates-Rates

Repository files navigation

BE-Mates-Rates - HOST

The backend of our Mates Rates app that list reviews of restaurants your friends have been to. In here will be the database and the server

Example Queries

Restaurant Type

{
  restaurant(id: "5fad52e16b765b6024a6da3a") {
    id
    name
    address
    cuisine
    website
    logo
    information
    phone
    description
    
    # city type
    city {
      id
      name
    }
    
    # review type
    reviews {
      id
      rating
      body
    }
  }
}

User Type

{
  user(id: "5fad52e16b765b6024a6da5d") {
    id
    name
    username
    avatarURL
    
    # user type
    friends {
      id
      name
      avatarURL
      ...
    }
    
    #restaurant type
    wishlist {
      id
      name
      cuisine
      logo
      ...
    }
    
    #review type
    reviews {
      id
      rating
      body
      ...
    }
  }
}

Review type

    {
  reviews {
    id
    body
    rating
    
    # user type
    user_id {
      id
      name
      avatarURL
      ...
    }
    
    # restaurant type
    restaurant_id {
      id
      name
      cuisine
      ...
    }
  }
}

Get list of users with wishlist and reviews:

{
  # user type
  users {
    id
    name
    username
    avatarURL
    
    # user type
    friends {
      id
      name
      avatarURL
      ...
    }
    
    #restaurant type
    wishlist {
      id
      name
      cuisine
      logo
      ...
    }
    
    #review type
    reviews {
      id
      rating
      body
      ...
    }
  }
}

Get list of restaurants with all info and reviews:

{
  # restaurant type
  restaurants {
    id
    name
    address
    cuisine
    website
    logo
    information
    phone
    description
    city {
      id
      name
    }
    
    # review type
    reviews {
      id
      rating
      body
      ...
    }
  }
}

Get list of reviews with users and restaurants:

{
  # review type
  reviews {
    id
    body
    rating
    
    # user type
    user_id {
      id
      name
      avatarURL
      ...
    }
    
    # restaurant type
    restaurant_id {
      id
      name
      cuisine
      logo
      ...
    }
  }
}

About

The backend of our app that list reviews of restaurants your friends have been to. In here will be the database and the server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors