useBackendWithCorrelation()
Home > @gooddata/sdk-ui > useBackendWithCorrelation
useBackendWithCorrelation() function
Hook to get a backend instance with correlation metadata from context, and optionally merge them with additional correlation metadata provided as a parameter.
Signature:
useBackendWithCorrelation: (backend?: IAnalyticalBackend, correlationMetadata?: IRequestCorrelationMetadata) => IAnalyticalBackend | undefined
Parameters
| Parameter | Type | Description | 
|---|---|---|
| backend | (Optional) optional backend override | |
| correlationMetadata | (Optional) optional correlation metadata to merge with the context data | 
Returns:
IAnalyticalBackend | undefined
Remarks
This hook enhances the backend from useBackend() with correlation metadata from the nearest CorrelationProvider.