Last active
November 26, 2017 11:09
-
-
Save nderkach/b460af54ef238b9435ca708e174d5e86 to your computer and use it in GitHub Desktop.
Graphene schema for Airbnb reviews
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from graphene import ObjectType, String, Boolean, ID, Field, Int | |
class User(ObjectType): | |
first_name = String() | |
has_profile_pic = Boolean() | |
id = ID() | |
picture_url = String() | |
smart_name = String() | |
thumbnail_url = String() | |
class Listing(ObjectType): | |
id = ID() | |
name = String() | |
class Review(ObjectType): | |
author = Field(User) | |
author_id = ID() | |
can_be_edited = Boolean() | |
comments = String() | |
created_at = String() | |
id = Int() | |
language = String() | |
listing = Field(Listing) | |
listing_id = ID() | |
recipient = Field(User) | |
recipient_id = ID() | |
response = String() | |
role = String() | |
user_flag = Boolean() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment