0
0
GraphQLquery~5 mins

Apollo Federation concepts in GraphQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Apollo Federation in GraphQL?
Apollo Federation is a way to combine multiple GraphQL services into one unified graph, allowing teams to build and maintain parts of the graph independently.
Click to reveal answer
beginner
What is a @key directive in Apollo Federation?
The @key directive marks a field or set of fields as the unique identifier for an entity in a subgraph, so it can be referenced and resolved across services.
Click to reveal answer
intermediate
Explain the role of the @extends directive in Apollo Federation.
The @extends directive is used to indicate that a type or field is extending an entity defined in another subgraph, allowing services to add fields to shared types.
Click to reveal answer
intermediate
What does the @external directive do in Apollo Federation?
The @external directive marks a field as owned by another subgraph, so the current subgraph can reference it but does not provide its value.
Click to reveal answer
beginner
How does Apollo Gateway work in Apollo Federation?
Apollo Gateway acts as a single entry point that composes the subgraphs' schemas into one federated schema and routes incoming queries to the appropriate subgraphs.
Click to reveal answer
What is the purpose of the @key directive in Apollo Federation?
ATo define query resolvers
BTo extend types from other subgraphs
CTo mark fields as owned externally
DTo mark fields as unique identifiers for entities
Which component composes multiple subgraphs into a single schema in Apollo Federation?
AApollo Server
BGraphQL Client
CApollo Gateway
DApollo Studio
What does the @external directive indicate?
AField is owned by another subgraph
BField is a unique key
CField is deprecated
DField is a query root
How do subgraphs share and extend types in Apollo Federation?
AUsing <code>@extends</code> directive
BUsing <code>@key</code> directive
CUsing <code>@external</code> directive
DUsing <code>@deprecated</code> directive
What is the main benefit of Apollo Federation?
ACaches all queries on the client
BEnables multiple teams to build parts of a graph independently
CAutomatically generates database schemas
DReplaces REST APIs completely
Describe how Apollo Federation allows multiple GraphQL services to work together as one.
Think about how different teams can build parts and how they connect.
You got /4 concepts.
    Explain the roles of the @key, @extends, and @external directives in Apollo Federation.
    Focus on how these directives help share and extend types.
    You got /3 concepts.