Our GraphQL schema provides the monitorDevice() subscription so that clients can receive device updates. This subscription should be updated to allow clients to retrieve historical information, too.
There should be an argument which provides a start and stop date.
Argument
Result
null
Returns latest value and all future values (i.e. current behavior.)
{ start: DATE }
If DATE is in the past, it will return all data from that point onward and then all future data until canceled. If DATE is in the future, the client will receive all updates after the date until canceled.
{ end: DATE }
If DATE is in the past, the subscription will immediately end. If DATE is in the future, the last value will be sent followed by all updates until the end date is reached, at which point the subscription ends.
{ start: SDATE, end: EDATE }
The dates will be swapped, if necessary, so that the start date is before the end date. Then the above rules will be used to start, stop, and end the subscription.
Our GraphQL schema provides the
monitorDevice()
subscription so that clients can receive device updates. This subscription should be updated to allow clients to retrieve historical information, too.There should be an argument which provides a start and stop date.
null
{ start: DATE }
DATE
is in the past, it will return all data from that point onward and then all future data until canceled. IfDATE
is in the future, the client will receive all updates after the date until canceled.{ end: DATE }
DATE
is in the past, the subscription will immediately end. IfDATE
is in the future, the last value will be sent followed by all updates until the end date is reached, at which point the subscription ends.{ start: SDATE, end: EDATE }