Skip to content

Instantly share code, notes, and snippets.

View Yusfuu's full-sized avatar
👋
🌍

Youssef Hajjari Yusfuu

👋
🌍
View GitHub Profile
const expr = 'Papayas';
// old way
switch (expr) {
case 'Oranges':
console.log('Oranges are $0.59 a pound.');
break;
case 'Apples':
console.log('Apples are $0.32 a pound.');
break;
type Review {
"""
The business that this review is about
"""
business: Business
}
type Review {
"""
ID of the business that this review is about
"""
businessId: Int
}
Business {
# The name of the business (e.g. "The French Laundry")
name: String
"The rating of the business"
rating: Float
}
Business {
"""
The name of the business (e.g. "The French Laundry")
"""
name: String
"""
The rating of the business
"""
rating: Float
type User {
"""The user's name"""
name: String!
"""The user's email"""
email: String!
"""The user's avatar"""
avatar: String
}
type User {
"""
The user's name.
"""
name: String!
"""
The user's email
"""
email: String!
type BusinessCard {
socialBusinessCard: [String];
# etc.
}
type BusinessCard {
socials: [String]
# etc.
}
type Review {
"""
A photo that the user uploaded with this review
"""
uploadedPhoto: BusinessPhoto
"""
When was this review posted?
"""
createdAt: DateTime