Run test queries

Your last step will be to execute a test query to verify that the new API is working properly. Select Queries from the left sidebar in AppSync. Click Login with User Pools, select the user pool client ID from the first drop-down, then put in a username for one of your workers. rtworker should work for the Retailer, and spworker for the Supplier. Put Password123 as the password. Click Login.

Log into the API with a valid user from the pool

After logging in, try pasting the following query in and executing it by clicking the orange play icon.

query GetProduct {
  product(id: "TEST1234") {
    id
    state
    history {
      manufactured
      inspected
      shipped
      labeled
      stocked
      sold
    }
  }
}

It should return the record you created earlier in module three.

Result from executing a sample query