Water and Hydration
Get historical water tracked by date
Use the hydration
query to get the information on the daily water intake based on a start and end date.
Note: Currently tracking service only supports JWT authentication
Required Arguments
Argument
Type
Note
startDate
Date
The date when the water entries will start counting. Use the format: YYYY-MM-DD
endDate
Date
The date when the water entries will end counting. Use the format: YYYY-MM-DD
Available Fields
Field
Type
Note
isToday
Boolean
True if it is today's date; otherwise, it will display the False value
quantity
Float
Number of cups of water to intake
date
Date
The date when 1 cup of water has been logged. Use the format: YYYY-MM-DD
goal
Float
The number of cups of water to be intake. The default goal to be defined is 8 cups of water.
Example
GraphQL Example
{
hydration(
startDate: "2020-10-06"
endDate: "2020-10-13")
{
isToday
quantity
date
goal
}
}
curl Example
curl -XPOST 'https://production.suggestic.com/graphql' \
-H 'Authorization: Bearer <User-JWT>' \
-H 'Content-Type: application/json' \
--data-raw '{"query": "query { hydration(startDate:\"2020-10-13\", endDate:\"2021-05-10\") { isToday quantity date goal }}"}'
}'
Last updated
Was this helpful?