4m
Practice
Answer the next question using the schema below:
Example schema
type Booking {id: ID!checkInDate: String!checkOutDate: String!status: BookingStatus!hostReview: Review@connect(source: "listings"http: { GET: "/review?bookingId={???}" }selection: """idtextrating""")}
Which of the following should replace
???
in the schema?Which of the following are valid locations to apply the
@connect
directive? (Select all that apply)Key takeaways
- A single client request can retrieve data from multiple endpoints with the use of Apollo Connectors.
- The
@connect
directive can be applied to fields on root types or object types. - To access an object type's fields from within its Connector, we can use
$this
.
Up next
In the next lesson, we'll continue to expand our schema and tap into the power of entities.
Share your questions and comments about this lesson
Your feedback helps us improve! If you're stuck or confused, let us know and we'll help you out. All comments are public and must follow the Apollo Code of Conduct. Note that comments that have been resolved or addressed may be removed.
You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum instead.