Skip to content

npendery/temperature_feed_challenge

Repository files navigation

Temperature Feed App

CircleCI

Setup and run application

Copy env from example

$ cp .env.example .env

Start services in background

$ make run_all

Start temperature feed

Utilize the GQL mutation request below at the graph endpoint

Create admin user

$ docker-compose run -ti backend /bin/bash

app# python manage.py createsuperuser --noinput --username adminuser --email [email protected]

View Django admin

View the admin portal here

Available GQL queries

Get current temperature

query {
    currentTemperature {
        timestamp
        value
    } 
}

Get min and max temperatures for time period

query {
    temperatureStatistics(after: "2020-12-06T12:00:00+00:00", before: "2020-12-07T12:00:00+00:00") {
        min
        max
    } 
}

Toggle the temperature feed

mutation {
    toggleFeed(input: {status: "on"}) {
        status
    } 
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published