Odyssey

Federation from Day One: Thinking in entities

1. Workshop intro2. Federated GraphQL architecture3. Exercise: Schema planning4. Follow-along: rover dev5. Follow-along: Query plan6. Entities7. Exercise: Defining & contributing to an entity8. Exercise: Referencing an entity9. @requires & @external10. Exercise: Using @requires & @external11. What's next?
9. @requires & @external
1m

Using @requires and @external

Use the schema below to answer the following questions.

Shipping subgraph
# Shiping subgraph
type Product @key(fields: "id") {
id: ID!
size: Int @external
weight: Int @external
shippingEstimate: String @requires(fields: "size weight")
}
Which of the following statements are correct? (Select all that apply)
True or False: You can define more than one field in the @requires directive.
Previous
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.

              NEW COURSE ALERT

              Introducing Apollo Connectors

              Connectors are the new and easy way to get started with GraphQL, using existing REST APIs.

              Say goodbye to GraphQL servers and resolvers—now, everything happens in the schema!

              Take the course