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 s split between multiple s. An entity is the building block of a .

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)
  • file (optional, can use )

Setting up rover dev

  1. If you stopped the recipes server 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 query the locally-running ! This is like the cloud router, 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 query below to confirm everything is working.

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