-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlistings.graphql
51 lines (44 loc) · 1.12 KB
/
listings.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
extend schema
@link(url: "https://specs.apollo.dev/federation/v2.10", import: ["@key"])
type Query {
"A curated array of listings to feature on the homepage"
featuredListings: [Listing!]!
# # EXERCISE: LISTING DETAILS
# "A specific listing"
# listing(id: ID!): Listing
}
"A particular intergalactic location available for booking"
type Listing {
id: ID!
"The listing's title"
title: String!
"The number of beds available"
numOfBeds: Int
"The cost per night"
costPerNight: Float
"Indicates whether listing is closed for bookings (on hiatus)"
closed: Boolean
# # EXERCISE: LISTING AMENITIES
# "The amenities available for this listing"
# amenities: [Amenity!]!
}
# # EXERCISE: LISTING AMENITIES
# type Amenity {
# id: ID!
# "The amenity category the amenity belongs to"
# category: String!
# "The amenity's name"
# name: String!
# }
# # EXERCISE: MUTATIONS
# input CreateListingInput {
# title: String!
# numOfBeds: Int
# costPerNight: Float
# }
# type CreateListingResponse {
# listing: Listing
# }
# type Mutation {
# createListing(input: CreateListingInput!): CreateListingResponse
# }