This is just starting point for further developlemt.
- Add Redis server to docker-compose+network and use in project
- Cache each fetch results in to redis (watchout for null responses)
- Is possible to use just
Filmquery with optional param(id)and returnFilm[] | Filminstead of usingFilms - Add tests - probably Jest can suit all needs
Packaget that fix problem:
datasource-rest
dataloader
My node version = 20.9.0
git clone https://github.com/kamilkodzi/star-api.gitcd star-apinpm inpm run dev
Be sure you have docker instaled on your system, then:
cd infra\docer-compose\docker-compose up- visit
http://localhost:4000/Projest starts on dev mode with hot-reloading, so uou can add any console.log() just like that [TIP]: Use query bellow and watch console. Each fetch will be prompt
query Films {
films {
title
producer
planets {
terrain
name
films {
species {
name
language
}
}
}
characters {
name
}
vehicles {
name
pilots {
name
}
}
}
}
`