Skip to main content

Load data

Load some data into the application

Before taking a closer look at the different schemas, we're gonna load some data into the application to make it a bit more interesting.

info

The application must be running on port 8000 while running the next command so it's important to keep the application running on one terminal and to start a new one to execute the command below

info

You may need to reissue the poetry shell command to reenter the virtual environment for this lab.

poetry shell
invoke lab1-load

Query the data via the REST API

List all devices in the REST APIhttp://localhost:8000/api/devices/

Query the data via the GraphQL API

GraphQL Sandboxhttp://localhost:8000/graphql
query {
devices {
name
site {
name
}
}
}