14. Exercise: Exploring entities & rover dev
1m

Goal Get familiar with entities in Studio and set up the rover dev experience locally.

Entities

An entity is an with split between multiple . An is the building block of a .

An entity shown with its fields provided by different subgraphs

Which of the following directives are used to define an entity?
In your Poetic Plates supergraph, which of the following types are entities?
For the Recipe entity, which of the following fields below are defined as its key(s)?
For the Appliance entity, which of the following fields below are defined as its key(s)?

rover dev

Runs your in your local dev environment.

For each , provide:

  • name
  • Where your is running (locally or remotely)
  • Schema file (optional, can use )

Setting up rover dev

  1. If you stopped the recipes at some point, start it again. In a terminal window, in the recipes repo, run:

    Terminal window 1: recipes server
    npm run dev
  2. In a second terminal window, run:

    Terminal window 2: rover dev process 1
    rover dev --name recipes \
    --schema ./schema.graphql \
    --url http://localhost:4001
  3. In your browser, go to http://localhost:4000. You should see a Sandbox environment, where you can the locally-running ! This is like the , but running locally.

    At this point, which of the following fields can you query at http://localhost:4000?
  4. In another terminal window, run:

    Terminal window 3: rover dev process 2
    rover dev --name kitchenware \
    --url https://poetic-plates-kitchenware-api.herokuapp.com/
    Which of the following statements about rover dev are true?
  5. Head back to http://localhost:4000 and run the below to confirm everything is working.

    query GetRandomRecipeAndAllCookware {
    randomRecipe {
    name
    description
    readyTime
    }
    allCookware {
    name
    description
    cleaningInstructions
    }
    }
Previous

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.