getGranularities()
Home > @gooddata/sdk-model > getGranularities
getGranularities() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The single source of truth for "which date granularities apply here".
Signature:
export declare function getGranularities(query: IGranularitiesQuery): DateAttributeGranularity[];
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
query |
Returns:
Remarks
Returns the calendar-relevant granularities in canonical coarse→fine order. Standard/fiscal chronological granularities come from the registry; a custom calendar supplies its own enabledGranularities (and their order). The result is calendar-relevant only — callers narrow it to a backend/dataset-supported subset.