5m
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 entity is an object that can be fetched using a unique identifier. To define an entity type in the schema, we use the
@key
directive along with the field(s) acting as its unique identifier. - The
@connect
directive attaches to an entity type to provide instructions for the router on how to retrieve the data for the entity's fields. - Satisfiability errors occur when a field in an operation 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!
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.