9. Using entities with Connectors
5m

(Text covers the exact same content as the video)

Practice

What directive is used to define an entity type in the GraphQL schema?
Which of the following scenarios can cause a satisfiability error?

Key takeaways

  • An is an object that can be fetched using a unique identifier. To define an in the schema, we use the @key along with the (s) acting as its unique identifier.
  • An also needs to provide instructions for the on how to retrieve the data for the entity's . To define the Connector with this role, we use entity: true.
  • Satisfiability errors occur when a in an can't be reached through the schema's Connectors.

Up next

One last lesson to go. We've tackled queries to retrieve data—now it's time to switch our attention over to manipulating data!

Next

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.