Getting started with GraphCool with the following ...
# prisma-whats-new
l
Getting started with GraphCool with the following high level question. Say that I want aggregate analytics from my data, e.g. average time to sale for vehicles in a given month. What’s a typical implementation? I imagine.. 1. API gateway with a function aggregating the data, e.g. clients calls (in pseudo code):
query { averageTimeToSale(from: date, to: date) { timeInDays}}
and the API gateway calls to the CRUD API
query { vehicles(soldDate > x and < y) { dateonline datesold}}
and a function manually parses the data to return
timeInDays
2. API gateway to a webhook that queries the database directly, e.g.
SELECT AVG(DATEDIFF(sold, online)) from vehicles WHERE ...
? Or am I missing the boat entirely?