-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use time series data request manager #2907
Open
jmbuss
wants to merge
4
commits into
rc
Choose a base branch
from
feat/use-time-series-data-request-manager
base: rc
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2d652fd
to
72aa24f
Compare
72aa24f
to
5f39ec6
Compare
5f39ec6
to
2789e76
Compare
2789e76
to
ece0c00
Compare
corteggiano
reviewed
Jul 22, 2024
@@ -9,5 +9,5 @@ export const queryClient = new QueryClient({ | |||
staleTime: STALE_TIME, | |||
}, | |||
}, | |||
queryCache: new QueryCache({}), | |||
queryCache: new QueryCache(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a difference or is it just cleaner this way?
2a210f0
to
75d93a0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This is the first piece of code for the useTimeSeriesData implementation. This includes a request manager which ensures that requests are deduped, and that the correct time intervals are picked.
Time intervals are created from:
There are 2 parts to this PR. the generic abstraction for resolving these intervals for any set of time series data. These classes are contained in the useTimeSeriesData hook. The concrete implementations will be in their own hooks, for example, the useAssetPropertyValueHistory hook. This will be the implementation of useTimeSeriesData for raw historical data. There will also be an implementation for useAssetPropertyAggregates and useGetAssetPropertyValue. Those will follow after completion of useAssetPropertyValueHistory as their implementations will be roughly the same with a few modifications to the cache client and request functions.
Legal
This project is available under the Apache 2.0 License.