3. How Connectors work in the schema
3m

Practice

What is the purpose of the @source directive?
What does the @connect directive do?

Key takeaways

  • The @source sets up data sources, including their name, base URL, and any necessary HTTP headers.
  • The @connect attaches to root or object , defining instructions for our request and responses to a REST API endpoint.
  • The serves as the single entry point to the API, taking care of the orchestration for us.

Up next

Let's jump into the schema and put these to work! Coming up next, we'll use @source to define our REST API data source.


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.