@link(url: "https://specs.apollo.dev/federation/v2.15",
"Currently logged-in user"
"A curated array of listings to feature on the homepage"
featuredListings: [Listing!]!
"Search results for listings that fit the criteria provided"
searchListings(criteria: SearchListingsInput): [Listing]!
"Return the listings that belong to the currently logged-in host"
"Returns the details about this listing"
listing(id: ID!): Listing
"Returns all possible amenities for a listing"
listingAmenities: [Amenity!]!
"All bookings for the given listing, optionally filtered by a BookingStatus"
bookingsForListing(listingId: ID!, status: BookingStatus): [Booking]!
"A list of bookings for the guest - must be authenticated as guest"
guestBookings: [Booking]!
"Past bookings for guest based on current date"
pastGuestBookings: [Booking]!
"Upcoming and current bookings for guest based on current date"
upcomingGuestBookings: [Booking]!
"Current booking for guest based on current date"
currentGuestBooking: Booking
"Updates the logged-in user's profile information"
updateProfile(updateProfileInput: UpdateProfileInput): UpdateProfileResponse!
"Creates a new listing for the currently authenticated host"
createListing(listing: CreateListingInput!): CreateListingResponse!
"Updates an existing listing"
updateListing(listingId: ID!, listing: UpdateListingInput!): UpdateListingResponse!
createBooking(createBookingInput: CreateBookingInput): CreateBookingResponse!
"Creates reviews for both host and listing for a particular booking - must be authored by guest of past booking"
submitHostAndLocationReviews(
locationReview: ReviewInput!
): SubmitHostAndLocationReviewsResponse!
"Creates a review for the guest - must be authored by host of past booking"
submitGuestReview(bookingId: ID!, guestReview: ReviewInput!): SubmitGuestReviewResponse!
addFundsToWallet(amount: Float!): AddFundsToWalletResponse!
interface MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"
"Represents an Airlock user's common properties"
"The user's first and last name"
"The user's profile photo URL"
"A host is a type of Airlock user. They own listings."
type Host implements User @key(fields: "id") {
"The user's first and last name"
"The user's profile photo URL"
"The host's profile bio description, will be shown in the listing"
profileDescription: String!
"The overall calculated rating for the host"
"A guest is a type of Airlock user. They book places to stay."
type Guest implements User @key(fields: "id") {
"The user's first and last name"
"The user's profile photo URL"
"Amount of money in the guest's wallet"
"Fields that can be updated"
input UpdateProfileInput {
"The user's first and last name"
"The user's profile photo URL"
"The host's profile bio description, will be shown in the listing"
profileDescription: String
"The response after updating a profile"
type UpdateProfileResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"
"A listing is a location owned by a host. A listing has a list of amenities it offers. Listings have a fixed cost per night value."
type Listing @key(fields: "id") {
"The listing's description"
"The thumbnail image for the listing"
"The number of beds available"
"The location type of the listing"
locationType: LocationType!
"The amenities available for this listing"
"The list of bookings for a listing"
"The number of current and upcoming bookings for a listing"
numberOfUpcomingBookings: Int!
"An array of upcoming reserved dates that the listing has been booked for"
currentlyBookedDates: [ReservedDate]!
"The submitted reviews for this listing"
"The overall calculated rating for a listing"
"Calculated total cost of the listing with the given arguments"
totalCost(checkInDate: String!, checkOutDate: String!): Float!
"A booking is reserved for a certain date range, marked by the checkInDate and checkOutDate fields"
"Date the guest checks in"
"Date the guest checks out"
"What the location provides. An amenity should be tied to a specific category."
"The category for the amenity"
category: AmenityCategory!
"The name of the amenity. Should be short."
"The category an amenity belongs to."
"A listing can be one of these types."
"To search for a listing, you need these fields."
input SearchListingsInput {
"The page in the search results, defaults to 1"
"The number of listings you can display in a page, defaults to 5"
"The results sort order, defaults to cost descending"
"Listings can be sorted by these options"
"Used to create a listing"
input CreateListingInput {
"The listing's description"
"The thumbnail image for the listing"
"The number of beds available"
"The location type of the listing"
locationType: LocationType!
"The Listing's amenities "
"Updates the properties included. If none are given, don't update anything"
input UpdateListingInput {
"The listing's description"
"The thumbnail image for the listing"
"The number of beds available"
"The location type of the listing"
locationType: LocationType
"The Listing's amenities "
"Response after creating a listing"
type CreateListingResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"
"The newly created listing"
"Response after updating a listing"
type UpdateListingResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"
"The newly updated listing"
"A booking is a reservation for a specific listing"
type Booking @key(fields: "id") {
"The listing associated with the reservation"
"The guest that reserved the location"
"Check-in date for the reservation"
"Check-out date for the reservation"
"Total price paid, calculated using the listing's costPerNight and the check-in check-out dates"
"The status of the booking - check BookingStatus type for all possibilities"
"The guest's review of the location"
"The guest's review about the host"
"The host's review about the guest"
"The status of a booking"
"Fields for creating a booking"
input CreateBookingInput {
"ID of the listing associated with the booking"
"Minimum details needed for a newly created booking"
type NewBookingResponse {
"The response after creating a booking."
type CreateBookingResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"
"The newly-created booking"
booking: NewBookingResponse
"A review consists of a numerical rating and written text. It can be written by a host or a guest."
type Review @key(fields: "id") {
"Written comment the author has written about the review target"
"User that wrote the review"
"The numerical rating for the review target, on a scale of 1-5, with 5 being excellent."
"ReviewInput is the bare minimum needed to submit a review, not tied to any target."
"The response after submitting reviews for both host and location together."
type SubmitHostAndLocationReviewsResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"
"Newly created review about the host"
"Newly created review about the location"
"The response after submitting reviews for a guest."
type SubmitGuestReviewResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"
"Newly created review about the guest"
type AddFundsToWalletResponse implements MutationResponse {
"Similar to HTTP status code, represents the status of the mutation"
"Indicates whether the mutation was successful"
"Human-readable message for the UI"